# HG changeset patch # User Richard M. Stallman # Date 1008943740 0 # Node ID a31cdf6c917338edead90eea3dcb7c11385c5ad0 # Parent 103ed59cfd30d0e305b3f482502f7ed72a4d8384 (define-minor-mode): Make no arg by default in an interactive call, so that repeating the command toggles again. diff -r 103ed59cfd30 -r a31cdf6c9173 lisp/emacs-lisp/easy-mmode.el --- 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)