[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: turn-on-bug-reference-mode, turn-on-bug-reference-prog-mode type fun
From: |
Stefan Monnier |
Subject: |
Re: turn-on-bug-reference-mode, turn-on-bug-reference-prog-mode type functions |
Date: |
Sat, 03 Apr 2010 15:23:37 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> Another way to achieve this result is cleaner but a bigger change. It
> would be to change the meaning of the expression (MINOR-MODE-FUNCTION)
> so it turns the mode on, instead of toggling. This way, it would not
> behave specially when called from a hook. And I think that this behavior
> will seem more natural to people writing Lisp programs.
It's on my secret plan for Emacs-24, yes.
> However, we must not change the meaning of M-x MINOR-MODE-FUNCTION RET.
> That must continue to toggle, as users expect.
> We might want to invent another argument to make the Lisp function
> toggle the minor mode. After all, the interactive call has to convey
> that intention to the function via arguments.
The invention is already in Emacs-23 (maybe it even was there in
Emacs-22 already): minor modes defined with define-minor-mode already
use `toggle' (rather than nil) as argument value when
called interactively.
So the change you suggest is a one-liner for all minor modes defined
with define-minor-mode. The harder part is to convert all the remaining
minor modes to use define-minor-mode.
Stefan
- Re: Obsoleting end-user-functions [was: turn-on-* type functions], (continued)
- Re: Obsoleting end-user-functions, Stefan Monnier, 2010/04/05
- Re: Obsoleting end-user-functions, Davis Herring, 2010/04/05
- Re: Obsoleting end-user-functions, Chad Brown, 2010/04/05
- Re: Obsoleting end-user-functions, Stephen J. Turnbull, 2010/04/06
- Re: Obsoleting end-user-functions, Richard Stallman, 2010/04/06
- Re: turn-on-bug-reference-mode, turn-on-bug-reference-prog-mode type functions, Richard Stallman, 2010/04/04
Re: turn-on-bug-reference-mode, turn-on-bug-reference-prog-mode type functions, Dan Nicolaescu, 2010/04/03
Re: turn-on-bug-reference-mode, turn-on-bug-reference-prog-mode type functions,
Stefan Monnier <=