Mercurial > emacs
changeset 23223:da40016c8767
(Custom-save, Custom-reset-current, Custom-reset-saved)
(Custom-reset-standard): Fix menu inconsistency.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 10 Sep 1998 15:43:50 +0000 |
parents | dbd281c0a5bf |
children | b3821a9c2873 |
files | lisp/cus-edit.el |
diffstat | 1 files changed, 17 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/cus-edit.el Thu Sep 10 15:38:21 1998 +0000 +++ b/lisp/cus-edit.el Thu Sep 10 15:43:50 1998 +0000 @@ -659,7 +659,8 @@ (interactive) (let ((children custom-options)) (mapcar (lambda (child) - (when (memq (widget-get child :custom-state) '(modified set)) + (when (memq (widget-get child :custom-state) + '(modified set changed rogue)) (widget-apply child :custom-save))) children)) (custom-save-all)) @@ -686,27 +687,33 @@ "Reset all modified group members to their current value." (interactive) (let ((children custom-options)) - (mapcar (lambda (child) - (when (eq (widget-get child :custom-state) 'modified) - (widget-apply child :custom-reset-current))) + (mapcar (lambda (widget) + (and (default-boundp (widget-value widget)) + (if (memq (widget-get widget :custom-state) + '(modified changed)) + (widget-apply widget :custom-reset-current)))) children))) (defun Custom-reset-saved (&rest ignore) "Reset all modified or set group members to their saved value." (interactive) (let ((children custom-options)) - (mapcar (lambda (child) - (when (eq (widget-get child :custom-state) 'modified) - (widget-apply child :custom-reset-saved))) + (mapcar (lambda (widget) + (and (get (widget-value widget) 'saved-value) + (if (memq (widget-get widget :custom-state) + '(modified set changed rogue)) + (widget-apply widget :custom-reset-saved)))) children))) (defun Custom-reset-standard (&rest ignore) "Reset all modified, set, or saved group members to their standard settings." (interactive) (let ((children custom-options)) - (mapcar (lambda (child) - (when (eq (widget-get child :custom-state) 'modified) - (widget-apply child :custom-reset-standard))) + (mapcar (lambda (widget) + (and (get (widget-value widget) 'standard-value) + (if (memq (widget-get widget :custom-state) + '(modified set changed saved rogue)) + (widget-apply widget :custom-reset-standard)))) children))) ;;; The Customize Commands