Commit dbd7a811 authored by Karl Heuer's avatar Karl Heuer
Browse files

(Custom-save, Custom-reset-current, Custom-reset-saved)

(Custom-reset-standard): Fix menu inconsistency.
parent 19a2870f
......@@ -659,7 +659,8 @@ groups after non-groups, if nil do not order groups at all."
(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 @@ when the action is chosen.")
"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
......
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