From: Stefan Monnier Date: Fri, 18 Apr 2003 17:31:05 +0000 (+0000) Subject: (define-minor-mode): Only echo a message if the body didn't do so already. X-Git-Tag: ttn-vms-21-2-B4~10475 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=eb81f2758fe168ce4c38b59ea7aadd1e481ceb19;p=emacs.git (define-minor-mode): Only echo a message if the body didn't do so already. (easy-mmode-define-keymap): Remove unused var `suppress'. --- diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index c331bd744e3..af47454ca4d 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -203,12 +203,12 @@ With zero or negative ARG turn mode off. (if (interactive-p) (progn ,(if globalp `(customize-mark-as-set ',mode)) + (unless (current-message) (message ,(format "%s %%sabled" pretty-name) - (if ,mode "en" "dis")))) + (if ,mode "en" "dis"))))) (force-mode-line-update) ;; Return the new setting. ,mode) - ;; Autoloading an easy-mmode-define-minor-mode autoloads ;; everything up-to-here. :autoload-end @@ -341,7 +341,7 @@ KEY and BINDINGS are suitable for `define-key'. Optional NAME is passed to `make-sparse-keymap'. Optional map M can be used to modify an existing map. ARGS is a list of additional keyword arguments." - (let (inherit dense suppress) + (let (inherit dense) (while args (let ((key (pop args)) (val (pop args))) @@ -350,7 +350,6 @@ ARGS is a list of additional keyword arguments." (:dense (setq dense val)) (:inherit (setq inherit val)) (:group) - ;;((eq key :suppress) (setq suppress val)) (t (message "Unknown argument %s in defmap" key))))) (unless (keymapp m) (setq bs (append m bs))