mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(Custom-reset-standard): Make it handle Custom group
buffers correctly. (It used to throw an error in such buffers.) Make it ask for confirmation in group buffers and other Custom buffers containing more than one customization item.
This commit is contained in:
parent
2036ac732c
commit
eac1f7d830
1 changed files with 12 additions and 7 deletions
|
|
@ -800,13 +800,18 @@ 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)
|
||||
(and (widget-get widget :custom-standard-value)
|
||||
(widget-apply widget :custom-standard-value)
|
||||
(if (memq (widget-get widget :custom-state)
|
||||
'(modified set changed saved rogue))
|
||||
(widget-apply widget :custom-reset-standard))))
|
||||
children)))
|
||||
(when (or (and (= 1 (length children))
|
||||
(memq (widget-type (car children))
|
||||
'(custom-variable custom-face)))
|
||||
(yes-or-no-p "Really erase all customizations in this buffer? "))
|
||||
(mapc (lambda (widget)
|
||||
(and (if (widget-get widget :custom-standard-value)
|
||||
(widget-apply widget :custom-standard-value)
|
||||
t)
|
||||
(memq (widget-get widget :custom-state)
|
||||
'(modified set changed saved rogue))
|
||||
(widget-apply widget :custom-reset-standard)))
|
||||
children))))
|
||||
|
||||
;;; The Customize Commands
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue