[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: set-variable and defcustom
From: |
Jay Belanger |
Subject: |
Re: set-variable and defcustom |
Date: |
Fri, 04 Mar 2011 22:35:12 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>>> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=109
>>
>> And the recent thread about it:
>> http://lists.gnu.org/archive/html/emacs-devel/2010-10/msg00813.html
Interesting discussion, some of which even touched on Emacs.
While reading it (and the mention of merging `set-variable' and
`customize-set-variable'), I noticed that `customize-set-variable' will
use defcustom's :set value, but not the :get value. Since
`customize-set-variable' and friends get the value of the variable from
`custom-prompt-variable', I was wondering if it would be appropriate to have
`custom-prompt-variable' use defcustom's :get value when it finds the
current value of the variable, similarly to how `customize-set-variable'
uses defcustom's :set value, namely:
*** cus-edit.el.orig 2011-03-04 22:25:24.000000000 -0600
--- cus-edit.el 2011-03-04 22:16:01.000000000 -0600
*************** it as the third element in the list."
*** 941,947 ****
(widget-prompt-value type
prompt
(if (boundp var)
! (symbol-value var))
(not (boundp var))))
(t
(eval-minibuffer prompt))))))
--- 941,949 ----
(widget-prompt-value type
prompt
(if (boundp var)
! (funcall
! (or (get var 'custom-get)
'symbol-value)
! var))
(not (boundp var))))
(t
(eval-minibuffer prompt))))))