aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2001-06-22 20:06:07 +0000
committerRichard M. Stallman2001-06-22 20:06:07 +0000
commite8dd28e747f803426f7d7ca5e3a525864b07a0b6 (patch)
tree31241547988fac83752070c59f042e134e0d09c7
parentfdae95d4ed6c90625f0adcc8626099cba20eba0c (diff)
downloademacs-e8dd28e747f803426f7d7ca5e3a525864b07a0b6.tar.gz
emacs-e8dd28e747f803426f7d7ca5e3a525864b07a0b6.zip
(menu-bar-make-toggle): Construct the
function's doc string from HELP, not DOC, and make it accurate by adding "Toggle whether to " at the front and downcasing the initial. Change the HELP arg in some calls to make it fit this usage. (toggle-debug-on-quit, toggle-debug-on-error): Undo previous change.
-rw-r--r--lisp/menu-bar.el19
1 files changed, 9 insertions, 10 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 35245e093e8..0963629a397 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -517,7 +517,8 @@ Do the same for the keys of the same name."
517(defmacro menu-bar-make-toggle (name variable doc message help &rest body) 517(defmacro menu-bar-make-toggle (name variable doc message help &rest body)
518 `(progn 518 `(progn
519 (defun ,name () 519 (defun ,name ()
520 ,(concat doc ".") 520 ,(concat "Toggle whether to " (downcase (substring help 0 1))
521 (substring help 1) ".")
521 (interactive) 522 (interactive)
522 (if ,(if body `(progn . ,body) 523 (if ,(if body `(progn . ,body)
523 `(setq ,variable (not ,variable))) 524 `(setq ,variable (not ,variable)))
@@ -576,14 +577,12 @@ Do the same for the keys of the same name."
576 577
577(define-key menu-bar-options-menu [debug-on-quit] 578(define-key menu-bar-options-menu [debug-on-quit]
578 (menu-bar-make-toggle toggle-debug-on-quit debug-on-quit 579 (menu-bar-make-toggle toggle-debug-on-quit debug-on-quit
579 "Toggle whether to enter the Lisp Debugger on Quit/C-g" 580 "Enter Debugger on Quit/C-g" "Debug on Quit %s"
580 "Debug on Quit %s"
581 "Enter Lisp debugger when C-g is pressed")) 581 "Enter Lisp debugger when C-g is pressed"))
582(define-key menu-bar-options-menu [debug-on-error] 582(define-key menu-bar-options-menu [debug-on-error]
583 (menu-bar-make-toggle toggle-debug-on-error debug-on-error 583 (menu-bar-make-toggle toggle-debug-on-error debug-on-error
584 "Toggle whether to enter the Lisp Debugger on Error" 584 "Enter Debugger on Error" "Debug on Error %s"
585 "Debug on Error %s" 585 "Enter Lisp debugger when an error is signaled"))
586 "Enter Lisp debugger when error is signaled"))
587(define-key menu-bar-options-menu [debugger-separator] 586(define-key menu-bar-options-menu [debugger-separator]
588 '("--")) 587 '("--"))
589(define-key menu-bar-options-menu [toggle-auto-compression] 588(define-key menu-bar-options-menu [toggle-auto-compression]
@@ -604,7 +603,7 @@ Do the same for the keys of the same name."
604 (menu-bar-make-toggle toggle-uniquify-buffer-names uniquify-buffer-name-style 603 (menu-bar-make-toggle toggle-uniquify-buffer-names uniquify-buffer-name-style
605 "Use Directory Names in Buffer Names" 604 "Use Directory Names in Buffer Names"
606 "Directory name in buffer names (uniquify) %s" 605 "Directory name in buffer names (uniquify) %s"
607 "Uniquify a buffer name by adding parent directory names until unique" 606 "Uniquify buffer names by adding parent directory names"
608 (require 'uniquify) 607 (require 'uniquify)
609 (setq uniquify-buffer-name-style 608 (setq uniquify-buffer-name-style
610 (if (not uniquify-buffer-name-style) 609 (if (not uniquify-buffer-name-style)
@@ -615,7 +614,7 @@ Do the same for the keys of the same name."
615 (menu-bar-make-toggle toggle-case-fold-search case-fold-search 614 (menu-bar-make-toggle toggle-case-fold-search case-fold-search
616 "Case-Insensitive Search" 615 "Case-Insensitive Search"
617 "Case-Insensitive Search %s" 616 "Case-Insensitive Search %s"
618 "If checked, search ignores letter-case")) 617 "Ignore letter-case in search"))
619(define-key menu-bar-options-menu [auto-fill-mode] 618(define-key menu-bar-options-menu [auto-fill-mode]
620 '(menu-item "Word Wrap in Text Modes (Auto Fill)" 619 '(menu-item "Word Wrap in Text Modes (Auto Fill)"
621 toggle-text-mode-auto-fill 620 toggle-text-mode-auto-fill
@@ -625,7 +624,7 @@ Do the same for the keys of the same name."
625 (menu-bar-make-toggle 624 (menu-bar-make-toggle
626 toggle-truncate-lines truncate-lines 625 toggle-truncate-lines truncate-lines
627 "Truncate Long Lines in this Buffer" "Long Line Truncation %s" 626 "Truncate Long Lines in this Buffer" "Long Line Truncation %s"
628 "If checked, long lines are truncated on the screen" 627 "Truncate long lines on the screen"
629 (prog1 (setq truncate-lines (not truncate-lines)) 628 (prog1 (setq truncate-lines (not truncate-lines))
630 (set-buffer-modified-p (buffer-modified-p))))) 629 (set-buffer-modified-p (buffer-modified-p)))))
631(define-key menu-bar-options-menu [highlight-separator] 630(define-key menu-bar-options-menu [highlight-separator]
@@ -644,7 +643,7 @@ Do the same for the keys of the same name."
644 (menu-bar-make-toggle toggle-global-lazy-font-lock-mode global-font-lock-mode 643 (menu-bar-make-toggle toggle-global-lazy-font-lock-mode global-font-lock-mode
645 "Highlight Syntax (Global Font Lock)" 644 "Highlight Syntax (Global Font Lock)"
646 "Syntax Highlighting %s" 645 "Syntax Highlighting %s"
647 "Highlights text based on language syntax" 646 "Highlight text based on language syntax"
648 (global-font-lock-mode))) 647 (global-font-lock-mode)))
649 648
650 649