summaryrefslogtreecommitdiff
path: root/lisp/menu-bar.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-03-28 05:43:01 +0000
committerRichard M. Stallman <rms@gnu.org>1998-03-28 05:43:01 +0000
commit89f1709fdea722f418d6002ff564ce09c65e57cc (patch)
treef339cc24719bae3c799e5d7db81014395dd0d13d /lisp/menu-bar.el
parent8646fe223f4bf2a6f730daac131ebf427fad20f1 (diff)
downloademacs-89f1709fdea722f418d6002ff564ce09c65e57cc.tar.gz
(menu-bar-options-menu): Remove "Toggle" from item
names, using buttons instead. (menu-bar-make-toggle): Define a menu-item toggle button. (menu-bar-options-menu [save-place]): (require 'saveplace). (menu-bar-options-menu [toggle-auto-compression], [auto-fill-mode]) (menu-bar-options-menu [toggle-global-lazy-font-lock-mode]): Define a menu-item button.
Diffstat (limited to 'lisp/menu-bar.el')
-rw-r--r--lisp/menu-bar.el28
1 files changed, 17 insertions, 11 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index b1088108ab8..9a868bdd22a 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -388,24 +388,26 @@ Do the same for the keys of the same name."
`(setq ,variable (not ,variable)))
(message ,message "enabled")
(message ,message "disabled")))
- '(,doc . ,name)))
+ '(menu-item ,doc ,name .
+ (:button (:toggle . (and (boundp ',variable) ,variable))))))
(define-key menu-bar-options-menu [debug-on-quit]
(menu-bar-make-toggle toggle-debug-on-quit debug-on-quit
- "Toggle Debug on Quit" "Debug on Quit %s"))
+ "Debug on Quit" "Debug on Quit %s"))
(define-key menu-bar-options-menu [debug-on-error]
(menu-bar-make-toggle toggle-debug-on-error debug-on-error
- "Toggle Debug on Error" "Debug on Error %s"))
+ "Debug on Error" "Debug on Error %s"))
(define-key menu-bar-options-menu [options-separator]
'("--"))
(define-key menu-bar-options-menu [save-place]
(menu-bar-make-toggle toggle-save-place-globally save-place
- "Toggle Saving Place in Files between Sessions"
+ "Save Place in Files between Sessions"
"Saving place in files %s"
+ (require 'saveplace)
(setq-default save-place (not (default-value save-place)))))
(define-key menu-bar-options-menu [uniquify]
(menu-bar-make-toggle toggle-uniquify-buffer-names uniquify-buffer-name-style
- "Toggle Directory Names in Buffer Names"
+ "Use Directory Names in Buffer Names"
"Directory name in buffer names (uniquify) %s"
(require 'uniquify)
(setq uniquify-buffer-name-style
@@ -413,16 +415,20 @@ Do the same for the keys of the same name."
'forward))))
(define-key menu-bar-options-menu [transient-mark-mode]
(menu-bar-make-toggle toggle-transient-mark-mode transient-mark-mode
- "Toggle Transient Mark Mode (highlights region)"
+ "Transient Mark Mode (highlights region)"
"Transient Mark mode %s"))
(define-key menu-bar-options-menu [toggle-auto-compression]
- '("Toggle Automatic File De/compression" . auto-compression-mode))
+ '(menu-item "Automatic File De/compression"
+ auto-compression-mode .
+ (:button (:toggle . (rassq 'jka-compr-handler
+ file-name-handler-alist)))))
(define-key menu-bar-options-menu [auto-fill-mode]
- '("Toggle Auto Fill (word wrap) in Text modes"
- . toggle-text-mode-auto-fill))
+ '(menu-item "Auto Fill (word wrap) in Text modes"
+ toggle-text-mode-auto-fill .
+ (:button (:toggle . (member 'turn-on-auto-fill text-mode-hook)))))
(define-key menu-bar-options-menu [toggle-global-lazy-font-lock-mode]
- (menu-bar-make-toggle toggle-global-lazy-font-lock-mode nil
- "Toggle Global Font Lock (highlights syntax)"
+ (menu-bar-make-toggle toggle-global-lazy-font-lock-mode global-font-lock-mode
+ "Global Font Lock (highlights syntax)"
"Global Font Lock mode %s"
;; Make sure a support mode is used;
;; otherwise Font Lock will be too slow.