diff options
author | Richard M. Stallman <rms@gnu.org> | 2004-10-26 08:31:40 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2004-10-26 08:31:40 +0000 |
commit | da67fa9af870eddfbd8181c1ae135b6342493139 (patch) | |
tree | a7633bce221663f32177c23497568f21cadaed13 /lisp/menu-bar.el | |
parent | 1d3b75d82e7991c37013dad9fdd62723e4dc17c5 (diff) | |
download | emacs-da67fa9af870eddfbd8181c1ae135b6342493139.tar.gz |
(menu-bar-make-toggle): Instead of interactive-p,
use an arg set non-nil by the interactive spec.
Diffstat (limited to 'lisp/menu-bar.el')
-rw-r--r-- | lisp/menu-bar.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 17deeff4619..22840896c17 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -596,10 +596,12 @@ PROPS are additional properties." (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 @@ PROPS are additional properties." ;; 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) |