diff options
| author | Luc Teirlinck | 2005-11-22 23:28:28 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2005-11-22 23:28:28 +0000 |
| commit | eac1f7d830bf3718849615973b30fc4ba1829fae (patch) | |
| tree | f71b7bf5533caec45730e18b676774cf3256f781 | |
| parent | 2036ac732c9463a12fa9b224f4d0316f83021bc3 (diff) | |
| download | emacs-eac1f7d830bf3718849615973b30fc4ba1829fae.tar.gz emacs-eac1f7d830bf3718849615973b30fc4ba1829fae.zip | |
(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.
| -rw-r--r-- | lisp/cus-edit.el | 19 |
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, | |||
| 800 | making them as if they had never been customized at all." | 800 | making them as if they had never been customized at all." |
| 801 | (interactive) | 801 | (interactive) |
| 802 | (let ((children custom-options)) | 802 | (let ((children custom-options)) |
| 803 | (mapc (lambda (widget) | 803 | (when (or (and (= 1 (length children)) |
| 804 | (and (widget-get widget :custom-standard-value) | 804 | (memq (widget-type (car children)) |
| 805 | (widget-apply widget :custom-standard-value) | 805 | '(custom-variable custom-face))) |
| 806 | (if (memq (widget-get widget :custom-state) | 806 | (yes-or-no-p "Really erase all customizations in this buffer? ")) |
| 807 | '(modified set changed saved rogue)) | 807 | (mapc (lambda (widget) |
| 808 | (widget-apply widget :custom-reset-standard)))) | 808 | (and (if (widget-get widget :custom-standard-value) |
| 809 | children))) | 809 | (widget-apply widget :custom-standard-value) |
| 810 | t) | ||
| 811 | (memq (widget-get widget :custom-state) | ||
| 812 | '(modified set changed saved rogue)) | ||
| 813 | (widget-apply widget :custom-reset-standard))) | ||
| 814 | children)))) | ||
| 810 | 815 | ||
| 811 | ;;; The Customize Commands | 816 | ;;; The Customize Commands |
| 812 | 817 | ||