Commit eeb6cc88 authored by Chong Yidong's avatar Chong Yidong
Browse files

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
parent 1ff980ae
......@@ -5,6 +5,9 @@
2012-02-05 Chong Yidong <cyd@gnu.org>
* cus-edit.el (custom-variable-value-create): For mismatched
types, show the current value (Bug#7600).
* custom.el (defcustom): Doc fix.
2012-02-05 Glenn Morris <rgm@gnu.org>
......
......@@ -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))))))
......
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