changeset 47043:360c6fcdde04

(define-minor-mode): Use customize-mark-as-set for global minor modes.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 26 Aug 2002 16:40:49 +0000
parents 74f8b41068e0
children c3fb9620c314
files lisp/emacs-lisp/easy-mmode.el
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/easy-mmode.el	Mon Aug 26 12:38:59 2002 +0000
+++ b/lisp/emacs-lisp/easy-mmode.el	Mon Aug 26 16:40:49 2002 +0000
@@ -190,11 +190,13 @@
 	 ,@body
 	 ;; The on/off hooks are here for backward compatibility only.
 	 (run-hooks ',hook (if ,mode ',hook-on ',hook-off))
+	 (if (interactive-p)
+	     (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.
-	 (if (interactive-p)
-	     (message ,(format "%s %%sabled" pretty-name)
-		      (if ,mode "en" "dis")))
-	 (force-mode-line-update)
 	 ,mode)
 
        ;; Autoloading an easy-mmode-define-minor-mode autoloads