diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2002-08-26 16:40:49 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2002-08-26 16:40:49 +0000 |
commit | d99d3266b0dcf56f3f050dc9be2bdd3320b5e72c (patch) | |
tree | cfb7b0756f0a629d2b55f9b9061c8f3d422e40a2 /lisp/emacs-lisp | |
parent | 098ba983220689662e04b2baf4c5acd8bf602f95 (diff) | |
download | emacs-d99d3266b0dcf56f3f050dc9be2bdd3320b5e72c.tar.gz emacs-d99d3266b0dcf56f3f050dc9be2bdd3320b5e72c.tar.bz2 emacs-d99d3266b0dcf56f3f050dc9be2bdd3320b5e72c.zip |
(define-minor-mode): Use customize-mark-as-set for global minor modes.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 50b0f76c338..8f89d92a057 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -190,11 +190,13 @@ With zero or negative ARG turn mode off. ,@body ;; The on/off hooks are here for backward compatibility only. (run-hooks ',hook (if ,mode ',hook-on ',hook-off)) - ;; Return the new setting. (if (interactive-p) - (message ,(format "%s %%sabled" pretty-name) - (if ,mode "en" "dis"))) + (progn + ,(if globalp `(customize-mark-as-set ',mode)) + (message ,(format "%s %%sabled" pretty-name) + (if ,mode "en" "dis")))) (force-mode-line-update) + ;; Return the new setting. ,mode) ;; Autoloading an easy-mmode-define-minor-mode autoloads |