changeset 42236:a31cdf6c9173

(define-minor-mode): Make no arg by default in an interactive call, so that repeating the command toggles again.
author Richard M. Stallman <rms@gnu.org>
date Fri, 21 Dec 2001 14:09:00 +0000
parents 103ed59cfd30
children 0ec3fdf1c45e
files lisp/emacs-lisp/easy-mmode.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/easy-mmode.el	Fri Dec 21 14:07:45 2001 +0000
+++ b/lisp/emacs-lisp/easy-mmode.el	Fri Dec 21 14:09:00 2001 +0000
@@ -107,7 +107,7 @@
   (let* ((mode-name (symbol-name mode))
 	 (pretty-name (easy-mmode-pretty-mode-name mode lighter))
 	 (globalp nil)
-	 (togglep t)			;why would you ever want to toggle?
+	 (togglep t) ;; This should never be nil -- rms.
 	 (group nil)
 	 (extra-args nil)
 	 (keymap-sym (if (and keymap (symbolp keymap)) keymap
@@ -175,7 +175,9 @@
 With universal prefix ARG " (unless togglep "(or if ARG is nil) ") "turn mode on.
 With zero or negative ARG turn mode off.
 \\{%s}") pretty-name keymap-sym))
-	 (interactive (list (or current-prefix-arg (if ,mode 0 1))))
+	 ;; Make no arg by default in an interactive call,
+	 ;; so that repeating the command toggles again.
+	 (interactive)
 	 (setq ,mode
 	       (if arg
 		   (> (prefix-numeric-value arg) 0)