[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103545: * cus-edit.el (custom-prompt
From: |
Jay Belanger |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103545: * cus-edit.el (custom-prompt-variable): Use the `custom-get' property |
Date: |
Sat, 05 Mar 2011 20:04:41 -0600 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 103545
committer: Jay Belanger <address@hidden>
branch nick: trunk
timestamp: Sat 2011-03-05 20:04:41 -0600
message:
* cus-edit.el (custom-prompt-variable): Use the `custom-get' property
of the variable if it exists.
modified:
lisp/ChangeLog
lisp/cus-edit.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-03-06 00:30:16 +0000
+++ b/lisp/ChangeLog 2011-03-06 02:04:41 +0000
@@ -1,3 +1,8 @@
+2011-03-06 Jay Belanger <address@hidden>
+
+ * cus-edit.el (custom-prompt-variable): Use the `custom-get' property
+ of the variable if it exists.
+
2011-03-06 Juanma Barranquero <address@hidden>
* bookmark.el:
=== modified file 'lisp/cus-edit.el'
--- a/lisp/cus-edit.el 2011-03-04 02:24:47 +0000
+++ b/lisp/cus-edit.el 2011-03-06 02:04:41 +0000
@@ -920,6 +920,8 @@
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 @@
(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))))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103545: * cus-edit.el (custom-prompt-variable): Use the `custom-get' property,
Jay Belanger <=