unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* toggling a minor mode should not tell Customize that the value has been set
@ 2008-01-05 17:48 Drew Adams
  2008-01-06  2:14 ` Stefan Monnier
  2008-01-06 10:46 ` Richard Stallman
  0 siblings, 2 replies; 16+ messages in thread
From: Drew Adams @ 2008-01-05 17:48 UTC (permalink / raw)
  To: Emacs-Devel

`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.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-01-07 17:15 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-05 17:48 toggling a minor mode should not tell Customize that the value has been set Drew Adams
2008-01-06  2:14 ` Stefan Monnier
2008-01-06  8:01   ` Drew Adams
2008-01-06 16:16     ` Stefan Monnier
2008-01-06 20:47       ` Drew Adams
2008-01-06 21:20         ` Stefan Monnier
2008-01-06 23:00           ` Drew Adams
2008-01-07  1:32             ` Stefan Monnier
2008-01-06 22:41         ` martin rudalics
2008-01-06 23:41           ` Drew Adams
2008-01-07  1:26             ` Stefan Monnier
2008-01-07  7:34             ` martin rudalics
2008-01-07 11:31             ` Richard Stallman
2008-01-06 10:46 ` Richard Stallman
2008-01-06 16:19   ` toggling a minor mode should not tell Customize that the value hasbeen set Drew Adams
2008-01-07 17:15     ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).