/[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.246 by kfstorm, Fri Apr 30 21:44:12 2004 UTC revision 1.247 by rms, Tue Oct 26 08:31:40 2004 UTC
# Line 596  PROPS are additional properties." Line 596  PROPS are additional properties."
596    
597  (defmacro menu-bar-make-toggle (name variable doc message help &rest body)  (defmacro menu-bar-make-toggle (name variable doc message help &rest body)
598    `(progn    `(progn
599       (defun ,name ()       (defun ,name (&optional interactively)
600         ,(concat "Toggle whether to " (downcase (substring help 0 1))         ,(concat "Toggle whether to " (downcase (substring help 0 1))
601                  (substring help 1) ".")                  (substring help 1) ".\
602         (interactive)  In an interactive call, record this option as a candidate for saving
603    by \"Save Options\" in Custom buffers.")
604           (interactive "p")
605         (if ,(if body `(progn . ,body)         (if ,(if body `(progn . ,body)
606                `(progn                `(progn
607                   (custom-load-symbol ',variable)                   (custom-load-symbol ',variable)
# Line 612  PROPS are additional properties." Line 614  PROPS are additional properties."
614         ;; a variable is set interactively, as the purpose is to mark it as         ;; a variable is set interactively, as the purpose is to mark it as
615         ;; a candidate for "Save Options", and we do not want to save options         ;; a candidate for "Save Options", and we do not want to save options
616         ;; the user have already set explicitly in his init file.         ;; the user have already set explicitly in his init file.
617         (if (interactive-p) (customize-mark-as-set ',variable)))         (if interactively (customize-mark-as-set ',variable)))
618       '(menu-item ,doc ,name       '(menu-item ,doc ,name
619                   :help ,help                   :help ,help
620                   :button (:toggle . (and (default-boundp ',variable)                   :button (:toggle . (and (default-boundp ',variable)

Legend:
Removed from v.1.246  
changed lines
  Added in v.1.247

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