summaryrefslogtreecommitdiff
path: root/lisp/cus-edit.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-02-05 21:41:50 +0800
committerChong Yidong <cyd@gnu.org>2012-02-05 21:41:50 +0800
commiteeb6cc88a999104c4ada43ce4dee2c40875a2016 (patch)
tree5e32ea2a01e8930173645ef1d42bef77bed74dd3 /lisp/cus-edit.el
parent1ff980ae49715eb372acff8a193e36497a7665c4 (diff)
downloademacs-eeb6cc88a999104c4ada43ce4dee2c40875a2016.tar.gz
Fix presentation of type-mismatched customization widgets.
* lisp/cus-edit.el (custom-variable-value-create): For mismatched types, show the current value. Fixes: debbugs:7600
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r--lisp/cus-edit.el10
1 files changed, 4 insertions, 6 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 0d7b0733b64..d7b1b6f94fb 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -2599,7 +2599,6 @@ try matching its doc string against `custom-guess-doc-alist'."
:parent widget)
buttons))
((memq form '(lisp mismatch))
- ;; In lisp mode edit the saved value when possible.
(push (widget-create-child-and-convert
widget 'custom-visibility
:help-echo "Hide the value of this option."
@@ -2611,11 +2610,10 @@ try matching its doc string against `custom-guess-doc-alist'."
t)
buttons)
(insert " ")
- (let* ((value (cond ((get symbol 'saved-value)
- (car (get symbol 'saved-value)))
- ((get symbol 'standard-value)
- (car (get symbol 'standard-value)))
- ((default-boundp symbol)
+ ;; This used to try presenting the saved value or the
+ ;; standard value, but it seems more intuitive to present
+ ;; the current value (Bug#7600).
+ (let* ((value (cond ((default-boundp symbol)
(custom-quote (funcall get symbol)))
(t
(custom-quote (widget-get conv :value))))))