[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
toggling a minor mode should not tell Customize that the value has been
From: |
Drew Adams |
Subject: |
toggling a minor mode should not tell Customize that the value has been set |
Date: |
Sat, 5 Jan 2008 09:48:47 -0800 |
`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?
;; Avoid overwriting a message shown by the body,
;; but do overwrite previous messages.
(unless (and (current-message)
(not (equal ,last-message
(current-message))))
(message ,(format "%s %%sabled" pretty-name)
(if ,mode "en" "dis")))))
This means that if you so much as toggle a global minor mode, and you later
use `customize-customized' to see which options you have edited and set, the
minor mode variable shows up in the list of customized options.
This is wrong, IMO. Toggling a global minor mode should simply change the
variable's current value; it should not also tell Customize to set that
value (or tell it that the value has been set).
What was the rationale behind this behavior? Why should toggling
`iswitchb-mode' or `icicle-mode' tell Customize that the user has customized
the mode variable?
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. It is unlikely that a global minor mode variable is in this
category, and if it is, it should only be the use of Customize that counts
for this, not merely toggling the mode.
- toggling a minor mode should not tell Customize that the value has been set,
Drew Adams <=
- Re: toggling a minor mode should not tell Customize that the value has been set, Stefan Monnier, 2008/01/05
- 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