Commit b8919739 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

Fix previous change.

parent 107736a2
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* cus-edit.el (Custom-set, Custom-save): Ask for confirmation. * cus-edit.el (Custom-set, Custom-save): Ask for confirmation.
(Custom-reset-current, Custom-reset-saved): Likewise. (Custom-reset-current, Custom-reset-saved): Likewise.
(Custom-reset-standard): Likewise. (Custom-reset-standard): Show message if aborted.
(custom-mode): Doc fix, describing those commands. (custom-mode): Doc fix, describing those commands.
* mouse.el (mouse-drag-region-1): When following link via mouse-2, * mouse.el (mouse-drag-region-1): When following link via mouse-2,
......
...@@ -815,21 +815,20 @@ The immediate result is to restore them to their standard values. ...@@ -815,21 +815,20 @@ The immediate result is to restore them to their standard values.
This operation eliminates any saved values for the group members, This operation eliminates any saved values for the group members,
making them as if they had never been customized at all." making them as if they had never been customized at all."
(interactive) (interactive)
(if (yes-or-no-p "Eliminate saved values for all settings in this buffer? ") (let ((children custom-options))
(let ((children custom-options)) (if (or (and (= 1 (length children))
(when (or (and (= 1 (length children)) (memq (widget-type (car children))
(memq (widget-type (car children)) '(custom-variable custom-face)))
'(custom-variable custom-face))) (yes-or-no-p "Really erase all customizations in this buffer? "))
(yes-or-no-p "Really erase all customizations in this buffer? ")) (mapc (lambda (widget)
(mapc (lambda (widget) (and (if (widget-get widget :custom-standard-value)
(and (if (widget-get widget :custom-standard-value) (widget-apply widget :custom-standard-value)
(widget-apply widget :custom-standard-value) t)
t) (memq (widget-get widget :custom-state)
(memq (widget-get widget :custom-state) '(modified set changed saved rogue))
'(modified set changed saved rogue)) (widget-apply widget :custom-reset-standard)))
(widget-apply widget :custom-reset-standard))) children)
children))) (message "Aborted"))))
(message "Aborted")))
;;; The Customize Commands ;;; The Customize Commands
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment