From: Richard M. Stallman Date: Fri, 21 Dec 2001 14:12:50 +0000 (+0000) Subject: (define-minor-mode): Make no arg by default in an interactive call, X-Git-Tag: emacs-21.2~224 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=220a8d9e1c99f73393859caaed2bda83d32a0ab1;p=emacs.git (define-minor-mode): Make no arg by default in an interactive call, so that repeating the command toggles again. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 356a6f2cfa0..136e76c2814 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2001-12-21 Richard M. Stallman + + * emacs-lisp/easy-mmode.el (define-minor-mode): + Make no arg by default in an interactive call, + so that repeating the command toggles again. + + * emacs-lisp/lisp-mode.el (eval-defun-1): Cope with atoms as args. + 2001-12-18 Dave Love * progmodes/f90.el (f90-break-line): Avoid infinite recursion diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 0030600028d..92189f3ca82 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -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)