emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: Re: erase customization does not work]


From: Luc Teirlinck
Subject: Re: address@hidden: Re: erase customization does not work]
Date: Thu, 17 Nov 2005 22:39:20 -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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]