[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: toggling a minor mode should not tell Customize that the value has b
From: |
Stefan Monnier |
Subject: |
Re: toggling a minor mode should not tell Customize that the value has been set |
Date: |
Sat, 05 Jan 2008 21:14:25 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) |
> `define-minor-mode' adds this code to the definition of every minor mode:
> (if (called-interactively-p)
> (progn
> ,(if globalp `(customize-mark-as-set ',mode)) ; <=== WHY?
Because M-x foo-mode RET on such global minor-modes isn't much different
from M-x customize-variable RET foo-mode RET .... -> Set for current session.
> What was the rationale behind this behavior? Why should toggling
The rationale is that Custom does not like it when Elisp code modifies
a defcustom behind its back.
If we don't do it, then Custom will simply tell you that the variable
was set outside of Custom and that saving the var may hence not have
the expected effect.
> A user should be able to use `customize-customized' (including perhaps in
> `kill-emacs-query-functions') to see what s?he has customized and might want
> to save.
Exactly, after trying our M-x iswtchb-mode RET she may very much like to
see that iswitchb-mode is now eabled and that she could save it so that
it's enabled next time around.
Stefan
- toggling a minor mode should not tell Customize that the value has been set, Drew Adams, 2008/01/05
- Re: toggling a minor mode should not tell Customize that the value has been set,
Stefan Monnier <=
- RE: toggling a minor mode should not tell Customize that the value has been set, Drew Adams, 2008/01/06
- Re: toggling a minor mode should not tell Customize that the value has been set, Stefan Monnier, 2008/01/06
- RE: toggling a minor mode should not tell Customize that the value has been set, Drew Adams, 2008/01/06
- Re: toggling a minor mode should not tell Customize that the value has been set, Stefan Monnier, 2008/01/06
- RE: toggling a minor mode should not tell Customize that the value has been set, Drew Adams, 2008/01/06
- Re: toggling a minor mode should not tell Customize that the value has been set, Stefan Monnier, 2008/01/06
- Re: toggling a minor mode should not tell Customize that the value has been set, martin rudalics, 2008/01/06
- RE: toggling a minor mode should not tell Customize that the value has been set, Drew Adams, 2008/01/06
- Re: toggling a minor mode should not tell Customize that the value has been set, Stefan Monnier, 2008/01/06
- Re: toggling a minor mode should not tell Customize that the value has been set, martin rudalics, 2008/01/07