summaryrefslogtreecommitdiff
path: root/lisp/cus-edit.el
diff options
context:
space:
mode:
authorJay Belanger <jay.p.belanger@gmail.com>2011-03-05 20:04:41 -0600
committerJay Belanger <jay.p.belanger@gmail.com>2011-03-05 20:04:41 -0600
commitda0275f8e3bfcaa3e76bd681b3f7f67fd6f9c437 (patch)
treee2fc55abdb1cf3ee104a9b6ff64ec41cde564a1f /lisp/cus-edit.el
parent63c72eebd8e87b2582fe82b7072139aefd47065d (diff)
downloademacs-da0275f8e3bfcaa3e76bd681b3f7f67fd6f9c437.tar.gz
* cus-edit.el (custom-prompt-variable): Use the `custom-get' property
of the variable if it exists.
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r--lisp/cus-edit.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 8d12511fcdf..88821652784 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -920,6 +920,8 @@ it were the arg to `interactive' (which see) to interactively read the value.
If the variable has a `custom-type' property, it must be a widget and the
`:prompt-value' property of that widget will be used for reading the value.
+If the variable also has a `custom-get' property, that is used for finding
+the current value of the variable, otherwise `symbol-value' is used.
If optional COMMENT argument is non-nil, also prompt for a comment and return
it as the third element in the list."
@@ -941,7 +943,9 @@ it as the third element in the list."
(widget-prompt-value type
prompt
(if (boundp var)
- (symbol-value var))
+ (funcall
+ (or (get var 'custom-get) 'symbol-value)
+ var))
(not (boundp var))))
(t
(eval-minibuffer prompt))))))