diff options
| author | Chong Yidong | 2012-02-05 21:41:50 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-02-05 21:41:50 +0800 |
| commit | eeb6cc88a999104c4ada43ce4dee2c40875a2016 (patch) | |
| tree | 5e32ea2a01e8930173645ef1d42bef77bed74dd3 | |
| parent | 1ff980ae49715eb372acff8a193e36497a7665c4 (diff) | |
| download | emacs-eeb6cc88a999104c4ada43ce4dee2c40875a2016.tar.gz emacs-eeb6cc88a999104c4ada43ce4dee2c40875a2016.zip | |
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
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/cus-edit.el | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fdf25af86ee..6a31a20f947 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -5,6 +5,9 @@ | |||
| 5 | 5 | ||
| 6 | 2012-02-05 Chong Yidong <cyd@gnu.org> | 6 | 2012-02-05 Chong Yidong <cyd@gnu.org> |
| 7 | 7 | ||
| 8 | * cus-edit.el (custom-variable-value-create): For mismatched | ||
| 9 | types, show the current value (Bug#7600). | ||
| 10 | |||
| 8 | * custom.el (defcustom): Doc fix. | 11 | * custom.el (defcustom): Doc fix. |
| 9 | 12 | ||
| 10 | 2012-02-05 Glenn Morris <rgm@gnu.org> | 13 | 2012-02-05 Glenn Morris <rgm@gnu.org> |
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'." | |||
| 2599 | :parent widget) | 2599 | :parent widget) |
| 2600 | buttons)) | 2600 | buttons)) |
| 2601 | ((memq form '(lisp mismatch)) | 2601 | ((memq form '(lisp mismatch)) |
| 2602 | ;; In lisp mode edit the saved value when possible. | ||
| 2603 | (push (widget-create-child-and-convert | 2602 | (push (widget-create-child-and-convert |
| 2604 | widget 'custom-visibility | 2603 | widget 'custom-visibility |
| 2605 | :help-echo "Hide the value of this option." | 2604 | :help-echo "Hide the value of this option." |
| @@ -2611,11 +2610,10 @@ try matching its doc string against `custom-guess-doc-alist'." | |||
| 2611 | t) | 2610 | t) |
| 2612 | buttons) | 2611 | buttons) |
| 2613 | (insert " ") | 2612 | (insert " ") |
| 2614 | (let* ((value (cond ((get symbol 'saved-value) | 2613 | ;; This used to try presenting the saved value or the |
| 2615 | (car (get symbol 'saved-value))) | 2614 | ;; standard value, but it seems more intuitive to present |
| 2616 | ((get symbol 'standard-value) | 2615 | ;; the current value (Bug#7600). |
| 2617 | (car (get symbol 'standard-value))) | 2616 | (let* ((value (cond ((default-boundp symbol) |
| 2618 | ((default-boundp symbol) | ||
| 2619 | (custom-quote (funcall get symbol))) | 2617 | (custom-quote (funcall get symbol))) |
| 2620 | (t | 2618 | (t |
| 2621 | (custom-quote (widget-get conv :value)))))) | 2619 | (custom-quote (widget-get conv :value)))))) |