diff options
| author | Jay Belanger | 2011-03-05 20:04:41 -0600 |
|---|---|---|
| committer | Jay Belanger | 2011-03-05 20:04:41 -0600 |
| commit | da0275f8e3bfcaa3e76bd681b3f7f67fd6f9c437 (patch) | |
| tree | e2fc55abdb1cf3ee104a9b6ff64ec41cde564a1f | |
| parent | 63c72eebd8e87b2582fe82b7072139aefd47065d (diff) | |
| download | emacs-da0275f8e3bfcaa3e76bd681b3f7f67fd6f9c437.tar.gz emacs-da0275f8e3bfcaa3e76bd681b3f7f67fd6f9c437.zip | |
* cus-edit.el (custom-prompt-variable): Use the `custom-get' property
of the variable if it exists.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/cus-edit.el | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 283e07b7a19..e46ce544b3a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-03-06 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 2 | |||
| 3 | * cus-edit.el (custom-prompt-variable): Use the `custom-get' property | ||
| 4 | of the variable if it exists. | ||
| 5 | |||
| 1 | 2011-03-06 Juanma Barranquero <lekktu@gmail.com> | 6 | 2011-03-06 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * bookmark.el: | 8 | * bookmark.el: |
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. | |||
| 920 | 920 | ||
| 921 | If the variable has a `custom-type' property, it must be a widget and the | 921 | If the variable has a `custom-type' property, it must be a widget and the |
| 922 | `:prompt-value' property of that widget will be used for reading the value. | 922 | `:prompt-value' property of that widget will be used for reading the value. |
| 923 | If the variable also has a `custom-get' property, that is used for finding | ||
| 924 | the current value of the variable, otherwise `symbol-value' is used. | ||
| 923 | 925 | ||
| 924 | If optional COMMENT argument is non-nil, also prompt for a comment and return | 926 | If optional COMMENT argument is non-nil, also prompt for a comment and return |
| 925 | it as the third element in the list." | 927 | it as the third element in the list." |
| @@ -941,7 +943,9 @@ it as the third element in the list." | |||
| 941 | (widget-prompt-value type | 943 | (widget-prompt-value type |
| 942 | prompt | 944 | prompt |
| 943 | (if (boundp var) | 945 | (if (boundp var) |
| 944 | (symbol-value var)) | 946 | (funcall |
| 947 | (or (get var 'custom-get) 'symbol-value) | ||
| 948 | var)) | ||
| 945 | (not (boundp var)))) | 949 | (not (boundp var)))) |
| 946 | (t | 950 | (t |
| 947 | (eval-minibuffer prompt)))))) | 951 | (eval-minibuffer prompt)))))) |