diff lisp/menu-bar.el @ 90037:0fe073a08cef

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-65 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-634 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-639 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-640 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-641 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-59 - miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-60 Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 27 Oct 2004 05:42:04 +0000
parents 4c90ffeb71c5 0fcbc2db3d03
children e24e2e78deda
line wrap: on
line diff
--- a/lisp/menu-bar.el	Tue Oct 26 01:28:28 2004 +0000
+++ b/lisp/menu-bar.el	Wed Oct 27 05:42:04 2004 +0000
@@ -596,10 +596,12 @@
 
 (defmacro menu-bar-make-toggle (name variable doc message help &rest body)
   `(progn
-     (defun ,name ()
+     (defun ,name (&optional interactively)
        ,(concat "Toggle whether to " (downcase (substring help 0 1))
-		(substring help 1) ".")
-       (interactive)
+		(substring help 1) ".\
+In an interactive call, record this option as a candidate for saving
+by \"Save Options\" in Custom buffers.")
+       (interactive "p")
        (if ,(if body `(progn . ,body)
 	      `(progn
 		 (custom-load-symbol ',variable)
@@ -612,7 +614,7 @@
        ;; a variable is set interactively, as the purpose is to mark it as
        ;; a candidate for "Save Options", and we do not want to save options
        ;; the user have already set explicitly in his init file.
-       (if (interactive-p) (customize-mark-as-set ',variable)))
+       (if interactively (customize-mark-as-set ',variable)))
      '(menu-item ,doc ,name
 		 :help ,help
                  :button (:toggle . (and (default-boundp ',variable)