unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: [Martin.Buchmann@uni-jena.de: Re: erase customization does not work]
Date: Thu, 17 Nov 2005 22:39:20 -0600 (CST)	[thread overview]
Message-ID: <200511180439.jAI4dKo08447@raven.dms.auburn.edu> (raw)
In-Reply-To: <200511180054.jAI0sSh07595@raven.dms.auburn.edu> (message from Luc Teirlinck on Thu, 17 Nov 2005 18:54:28 -0600 (CST))

>From my prior message:

   The following would make the buffer-wide "Erase Customization" button
   work probably as well as the "Reset" and "Reset to saved" buttons:

   (defun Custom-reset-standard (&rest ignore)
     "Erase all customization (either current or saved) for the group members.
   The immediate result is to restore them to their standard settings.
   This operation eliminates any saved settings for the group members,
   making them as if they had never been customized at all."
     (interactive)
     (let ((children custom-options))
       (mapc (lambda (widget)
	       (when (memq (widget-get widget :custom-state)
			   '(modified set changed saved rogue))
		 (widget-apply widget :custom-reset-standard)))
	     children)))

   *I did not heavily test the above function* and do not recommend
   installing it,

Maybe some further remarks.  Apart from the fact that the "Erase
Customization" buttons are especially dangerous to an inadvertent
user, I feel reasonably confident that the above works _as well as_
the code for the buffer-wide "Reset" and "Reset to Saved" buttons.
What I did was just remove the same type of conditionals that the
change three years ago removed.  However, if there were any problems
with the change to the "Reset" and "Reset to Saved" button code three
years ago, that is if the removed lines were actually sometimes
necessary in Custom buffers _other_ than group customization buffers,
then nobody would have noticed any of the involved bugs in the
meantime (even if some bugs would be very obvious or severe), just
like nobody noticed that these buttons were no-ops in the prior five
and a half years: barely anybody uses these whole buffer buttons.

I am not going to spend a lot of time checking whether whether these
conditionals might be necessary in some situations in other types of
Custom buffers, because these whole buffer buttons are not used (and
should not be used) by anybody anyway (_except_ in buffers customizing
a single option or face).  It is impossible to rely on CVS users or
pretesters to discover any involved bugs, for that same reason.

Sincerely,

Luc.

  parent reply	other threads:[~2005-11-18  4:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-16 10:47 [Martin.Buchmann@uni-jena.de: Re: erase customization does not work] Richard M. Stallman
2005-11-18  0:54 ` Luc Teirlinck
2005-11-18  1:38   ` Luc Teirlinck
2005-11-18  2:17     ` Luc Teirlinck
2005-11-18  2:24     ` Luc Teirlinck
2005-11-18  4:39   ` Luc Teirlinck [this message]
2005-11-19 23:26   ` Richard M. Stallman
2005-11-19 23:42     ` David Kastrup
2005-11-20 23:22       ` Richard M. Stallman
2005-11-22  4:03     ` Luc Teirlinck
2005-11-22 20:33       ` Richard M. Stallman
2005-11-22  4:24     ` Luc Teirlinck
2005-11-22  4:32       ` Luc Teirlinck
2005-11-18  1:04 ` Luc Teirlinck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200511180439.jAI4dKo08447@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).