# HG changeset patch # User Luc Teirlinck # Date 1123376853 0 # Node ID a0da2f13ae201fe28bdf6fa4a435721e9652682e # Parent 5c99fdc302d4acfed13935fa61897020c0834ce7 (widget-choice-value-create): Unconditionally respect user choice. Set :explicit-choice back to nil when no longer needed. (widget-choice-action): Unconditionally respect user choice. Eliminate :explicit-choice-value. diff -r 5c99fdc302d4 -r a0da2f13ae20 lisp/wid-edit.el --- a/lisp/wid-edit.el Sun Aug 07 01:05:10 2005 +0000 +++ b/lisp/wid-edit.el Sun Aug 07 01:07:33 2005 +0000 @@ -1956,13 +1956,14 @@ (args (widget-get widget :args)) (explicit (widget-get widget :explicit-choice)) current) - (if (and explicit (equal value (widget-get widget :explicit-choice-value))) + (if explicit (progn ;; If the user specified the choice for this value, - ;; respect that choice as long as the value is the same. + ;; respect that choice. (widget-put widget :children (list (widget-create-child-value widget explicit value))) - (widget-put widget :choice explicit)) + (widget-put widget :choice explicit) + (widget-put widget :explicit-choice nil)) (while args (setq current (car args) args (cdr args)) @@ -2048,13 +2049,10 @@ (setq this-explicit t) (widget-choose tag (reverse choices) event)))) (when current - ;; If this was an explicit user choice, - ;; record the choice, and the record the value it was made for. - ;; widget-choice-value-create will respect this choice, - ;; as long as the value is the same. + ;; If this was an explicit user choice, record the choice, + ;; so that widget-choice-value-create will respect it. (when this-explicit - (widget-put widget :explicit-choice current) - (widget-put widget :explicit-choice-value (widget-get widget :value))) + (widget-put widget :explicit-choice current)) (widget-value-set widget (widget-default-get current)) (widget-setup) (widget-apply widget :notify widget event)))