/[emacs]/emacs/lisp/menu-bar.el
ViewVC logotype

Diff of /emacs/lisp/menu-bar.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.215 by kfstorm, Tue Apr 30 20:38:21 2002 UTC revision 1.216 by kfstorm, Wed May 1 22:01:16 2002 UTC
# Line 540  Do the same for the keys of the same nam Line 540  Do the same for the keys of the same nam
540    
541  ;(defvar menu-bar-preferences-menu (make-sparse-keymap "Preferences"))  ;(defvar menu-bar-preferences-menu (make-sparse-keymap "Preferences"))
542    
543  (defmacro menu-bar-make-toggle (name variable doc message help &rest body)  (defmacro menu-bar-make-toggle (name variable doc message help &optional props &rest body)
544    `(progn    `(progn
545       (defun ,name ()       (defun ,name ()
546         ,(concat "Toggle whether to " (downcase (substring help 0 1))         ,(concat "Toggle whether to " (downcase (substring help 0 1))
# Line 566  Do the same for the keys of the same nam Line 566  Do the same for the keys of the same nam
566                          (interactive)                          (interactive)
567                          (,name)                          (,name)
568                          (customize-mark-as-set ',variable))                          (customize-mark-as-set ',variable))
569                     ,@(if props props)
570                   :help ,help                   :help ,help
571                   :button (:toggle . (and (default-boundp ',variable)                   :button (:toggle . (and (default-boundp ',variable)
572                                           (default-value ',variable))))))                                           (default-value ',variable))))))
# Line 583  Do the same for the keys of the same nam Line 584  Do the same for the keys of the same nam
584      (dolist (elt '(line-number-mode column-number-mode scroll-bar-mode      (dolist (elt '(line-number-mode column-number-mode scroll-bar-mode
585                     debug-on-quit debug-on-error menu-bar-mode tool-bar-mode                     debug-on-quit debug-on-error menu-bar-mode tool-bar-mode
586                     save-place uniquify-buffer-name-style                     save-place uniquify-buffer-name-style
587                     case-fold-search show-paren-mode                     case-fold-search cua-mode show-paren-mode
588                     transient-mark-mode global-font-lock-mode                     transient-mark-mode global-font-lock-mode
589                     display-time-mode auto-compression-mode                     display-time-mode auto-compression-mode
590                     current-language-environment default-input-method                     current-language-environment default-input-method
# Line 777  Do the same for the keys of the same nam Line 778  Do the same for the keys of the same nam
778                          "Use Directory Names in Buffer Names"                          "Use Directory Names in Buffer Names"
779                          "Directory name in buffer names (uniquify) %s"                          "Directory name in buffer names (uniquify) %s"
780                          "Uniquify buffer names by adding parent directory names"                          "Uniquify buffer names by adding parent directory names"
781                            () ; no props
782                          (require 'uniquify)                          (require 'uniquify)
783                          (setq uniquify-buffer-name-style                          (setq uniquify-buffer-name-style
784                                (if (not uniquify-buffer-name-style)                                (if (not uniquify-buffer-name-style)
# Line 784  Do the same for the keys of the same nam Line 786  Do the same for the keys of the same nam
786    
787  (define-key menu-bar-options-menu [edit-options-separator]  (define-key menu-bar-options-menu [edit-options-separator]
788    '("--"))    '("--"))
789    (define-key menu-bar-options-menu [cua-mode]
790      '(menu-item "CUA-style cut and paste"
791                  (lambda ()
792                    (interactive)
793                    (cua-mode nil)
794                    (customize-mark-as-set 'cua-mode)
795                    (message "CUA-style cut and paste %s"
796                             (if cua-mode "enabled" "disabled")))
797                  :help "Use C-z/C-x/C-c/C-v keys for undo/cut/copy/paste"
798                  :button (:toggle . cua-mode)))
799  (define-key menu-bar-options-menu [case-fold-search]  (define-key menu-bar-options-menu [case-fold-search]
800    (menu-bar-make-toggle toggle-case-fold-search case-fold-search    (menu-bar-make-toggle toggle-case-fold-search case-fold-search
801                          "Case-Insensitive Search"                          "Case-Insensitive Search"
# Line 824  Do the same for the keys of the same nam Line 836  Do the same for the keys of the same nam
836    (menu-bar-make-toggle toggle-transient-mark-mode transient-mark-mode    (menu-bar-make-toggle toggle-transient-mark-mode transient-mark-mode
837                          "Active Region Highlighting (Transient Mark mode)"                          "Active Region Highlighting (Transient Mark mode)"
838                          "Transient Mark mode %s"                          "Transient Mark mode %s"
839                          "Make text in active region stand out in color"))                          "Make text in active region stand out in color"
840                            (:enable (not cua-mode))))
841  (define-key menu-bar-options-menu [toggle-global-lazy-font-lock-mode]  (define-key menu-bar-options-menu [toggle-global-lazy-font-lock-mode]
842    (menu-bar-make-toggle toggle-global-lazy-font-lock-mode global-font-lock-mode    (menu-bar-make-toggle toggle-global-lazy-font-lock-mode global-font-lock-mode
843                          "Syntax Highlighting (Global Font Lock mode)"                          "Syntax Highlighting (Global Font Lock mode)"

Legend:
Removed from v.1.215  
changed lines
  Added in v.1.216

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26