]> git.eshelyaron.com Git - emacs.git/commitdiff
* cus-edit.el (custom-prompt-variable): Use the `custom-get' property
authorJay Belanger <jay.p.belanger@gmail.com>
Sun, 6 Mar 2011 02:04:41 +0000 (20:04 -0600)
committerJay Belanger <jay.p.belanger@gmail.com>
Sun, 6 Mar 2011 02:04:41 +0000 (20:04 -0600)
  of the variable if it exists.

lisp/ChangeLog
lisp/cus-edit.el

index 283e07b7a194583bc0e7f49e125abc3e70ca6c38..e46ce544b3aef6547aafc5807d95f8b5cf1e5e9b 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-06  Jay Belanger  <jay.p.belanger@gmail.com>
+
+       * cus-edit.el (custom-prompt-variable): Use the `custom-get' property
+       of the variable if it exists.
+
 2011-03-06  Juanma Barranquero  <lekktu@gmail.com>
 
        * bookmark.el:
index 8d12511fcdf0d2d25c0ed74e06a4b1fdedab31a0..888216527846913e2686e66e9211cf1f9ecedc51 100644 (file)
@@ -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))))))