summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2001-12-21 14:12:30 +0000
committerRichard M. Stallman <rms@gnu.org>2001-12-21 14:12:30 +0000
commitd743da264342d075295a477c9e49dd185ee654a4 (patch)
tree000dd820c3cb77d55aae0b6cf16c058f1de16ed0 /lisp/emacs-lisp
parent726e8778c81119ae3ba25b6b22b77c47299f2bc3 (diff)
downloademacs-d743da264342d075295a477c9e49dd185ee654a4.tar.gz
emacs-d743da264342d075295a477c9e49dd185ee654a4.tar.bz2
emacs-d743da264342d075295a477c9e49dd185ee654a4.zip
(define-minor-mode): Make no arg by default in an interactive call,
so that repeating the command toggles again.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/easy-mmode.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 0030600028d..0757115ee40 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -107,7 +107,7 @@ BODY contains code that will be executed each time the mode is (dis)activated.
(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 @@ Interactively, with no prefix argument, toggle the mode.
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)