diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-11-02 10:17:08 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-11-02 10:17:08 +0100 |
commit | 5cea77af41b59ba6f6386264812c36ec31ba2efc (patch) | |
tree | 3288c47d9c7b92bfd203c76c9c76af4bd5419230 /lisp/emacs-lisp | |
parent | 5ab5504def63ebdfba08169f24a5829353bff137 (diff) | |
download | emacs-5cea77af41b59ba6f6386264812c36ec31ba2efc.tar.gz emacs-5cea77af41b59ba6f6386264812c36ec31ba2efc.tar.bz2 emacs-5cea77af41b59ba6f6386264812c36ec31ba2efc.zip |
Partially revert previous define-minor-mode change
* lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring):
Only document the values we want to support, not the ones we
actually support.
(define-minor-mode): Partially revert to previous behaviour.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 77f10e61c6c..261f2508af7 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -90,7 +90,7 @@ the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. -All other values will disable the mode. +Disable the mode if ARG is a negative number. The mode's hook is called both when the mode is enabled and when it is disabled.") @@ -312,12 +312,10 @@ or call the function `%s'.")))) (cond ((eq arg 'toggle) (not ,getter)) ((and (numberp arg) - (> arg 0)) - t) - ((eq arg nil) - t) + (< arg 1)) + nil) (t - nil))) + t))) ,@body ;; The on/off hooks are here for backward compatibility only. (run-hooks ',hook (if ,getter ',hook-on ',hook-off)) |