aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1998-09-10 15:43:50 +0000
committerKarl Heuer1998-09-10 15:43:50 +0000
commitdbd7a811cc300ef71728614eb379cb3545d5c29b (patch)
tree77751cbf27824a81518597ed8c28181f4b8158da
parent19a2870f7f94f241b5af35ccf7ea9c97f05b5de2 (diff)
downloademacs-dbd7a811cc300ef71728614eb379cb3545d5c29b.tar.gz
emacs-dbd7a811cc300ef71728614eb379cb3545d5c29b.zip
(Custom-save, Custom-reset-current, Custom-reset-saved)
(Custom-reset-standard): Fix menu inconsistency.
-rw-r--r--lisp/cus-edit.el27
1 files changed, 17 insertions, 10 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 77b946ece1a..5678b05431a 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -659,7 +659,8 @@ groups after non-groups, if nil do not order groups at all."
659 (interactive) 659 (interactive)
660 (let ((children custom-options)) 660 (let ((children custom-options))
661 (mapcar (lambda (child) 661 (mapcar (lambda (child)
662 (when (memq (widget-get child :custom-state) '(modified set)) 662 (when (memq (widget-get child :custom-state)
663 '(modified set changed rogue))
663 (widget-apply child :custom-save))) 664 (widget-apply child :custom-save)))
664 children)) 665 children))
665 (custom-save-all)) 666 (custom-save-all))
@@ -686,27 +687,33 @@ when the action is chosen.")
686 "Reset all modified group members to their current value." 687 "Reset all modified group members to their current value."
687 (interactive) 688 (interactive)
688 (let ((children custom-options)) 689 (let ((children custom-options))
689 (mapcar (lambda (child) 690 (mapcar (lambda (widget)
690 (when (eq (widget-get child :custom-state) 'modified) 691 (and (default-boundp (widget-value widget))
691 (widget-apply child :custom-reset-current))) 692 (if (memq (widget-get widget :custom-state)
693 '(modified changed))
694 (widget-apply widget :custom-reset-current))))
692 children))) 695 children)))
693 696
694(defun Custom-reset-saved (&rest ignore) 697(defun Custom-reset-saved (&rest ignore)
695 "Reset all modified or set group members to their saved value." 698 "Reset all modified or set group members to their saved value."
696 (interactive) 699 (interactive)
697 (let ((children custom-options)) 700 (let ((children custom-options))
698 (mapcar (lambda (child) 701 (mapcar (lambda (widget)
699 (when (eq (widget-get child :custom-state) 'modified) 702 (and (get (widget-value widget) 'saved-value)
700 (widget-apply child :custom-reset-saved))) 703 (if (memq (widget-get widget :custom-state)
704 '(modified set changed rogue))
705 (widget-apply widget :custom-reset-saved))))
701 children))) 706 children)))
702 707
703(defun Custom-reset-standard (&rest ignore) 708(defun Custom-reset-standard (&rest ignore)
704 "Reset all modified, set, or saved group members to their standard settings." 709 "Reset all modified, set, or saved group members to their standard settings."
705 (interactive) 710 (interactive)
706 (let ((children custom-options)) 711 (let ((children custom-options))
707 (mapcar (lambda (child) 712 (mapcar (lambda (widget)
708 (when (eq (widget-get child :custom-state) 'modified) 713 (and (get (widget-value widget) 'standard-value)
709 (widget-apply child :custom-reset-standard))) 714 (if (memq (widget-get widget :custom-state)
715 '(modified set changed saved rogue))
716 (widget-apply widget :custom-reset-standard))))
710 children))) 717 children)))
711 718
712;;; The Customize Commands 719;;; The Customize Commands