summaryrefslogtreecommitdiff
path: root/lisp/cus-edit.el
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2005-12-03 14:25:50 +0000
committerKaroly Lorentey <lorentey@elte.hu>2005-12-03 14:25:50 +0000
commit9ef706664e98e37e9633712126bae99869904677 (patch)
tree193bce7424700e4c7d70f54b04f7f81d64525554 /lisp/cus-edit.el
parent950bed4bb96d2a580818bdaab64a164c7c9a1c1e (diff)
parent9f6efa0c78099f2f028c4db1db5a58567a1cfb4e (diff)
downloademacs-9ef706664e98e37e9633712126bae99869904677.tar.gz
Merged from miles@gnu.org--gnu-2005 (patch 659-663)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-659 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-660 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-661 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-662 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-663 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-445
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r--lisp/cus-edit.el19
1 files changed, 12 insertions, 7 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 59a8b341cad..b84568b7060 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -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