* [lennart.borgman@gmail.com: How to set and save a defcustom]
@ 2007-03-05 2:54 Richard Stallman
2007-03-05 15:16 ` Chong Yidong
0 siblings, 1 reply; 4+ messages in thread
From: Richard Stallman @ 2007-03-05 2:54 UTC (permalink / raw)
To: emacs-devel
Can someone please debug this?
------- Start of forwarded message -------
Date: Tue, 27 Feb 2007 22:18:16 +0100
From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
MIME-Version: 1.0
To: Emacs Devel <emacs-devel@gnu.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Subject: How to set and save a defcustom
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed
version=3.0.4
If I do something like this
(customize-set-value 'xmlpe-css-hrefs hrefs)
(customize-set-variable 'xmlpe-css-hrefs hrefs)
(customize-save-variable 'xmlpe-css-hrefs hrefs)
and then
M-x customize-option RET xmlpe-css-hrefs RET
then Custom says that the value is just "Set for current session only".
It is actually saved. What is wrong here?
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
------- End of forwarded message -------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [lennart.borgman@gmail.com: How to set and save a defcustom]
[not found] <E1HMJE0-0003jT-5h@fencepost.gnu.org>
@ 2007-03-05 9:21 ` Per Abrahamsen
2007-03-05 21:11 ` Chong Yidong
0 siblings, 1 reply; 4+ messages in thread
From: Per Abrahamsen @ 2007-03-05 9:21 UTC (permalink / raw)
To: rms; +Cc: Lennart Borgman (gmail), Emacs Devel
This patch has not been tested:
2007-03-05 Per Abrahamsen <per.abrahamsen@gmail.com>
* cus-edit.el (customize-save-variable): Removed customized value.
*** cus-edit.el.~1.196.~ 2004-12-02 15:15:59.000000000 +0100
--- cus-edit.el 2007-03-05 10:17:13.000000000 +0100
***************
*** 816,821 ****
--- 816,822 ----
current-prefix-arg))
(funcall (or (get variable 'custom-set) 'set-default) variable value)
(put variable 'saved-value (list (custom-quote value)))
+ (put variable 'customized-value nil)
(custom-push-theme 'theme-value variable 'user 'set (list
(custom-quote value)))
(cond ((string= comment "")
(put variable 'variable-comment nil)
On 2/28/07, Richard Stallman <rms@gnu.org> wrote:
> Can you please help us fix this?
>
> ------- Start of forwarded message -------
> Date: Tue, 27 Feb 2007 22:18:16 +0100
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> MIME-Version: 1.0
> To: Emacs Devel <emacs-devel@gnu.org>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Subject: How to set and save a defcustom
> X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed
> version=3.0.4
>
> If I do something like this
>
> (customize-set-value 'xmlpe-css-hrefs hrefs)
> (customize-set-variable 'xmlpe-css-hrefs hrefs)
> (customize-save-variable 'xmlpe-css-hrefs hrefs)
>
> and then
>
> M-x customize-option RET xmlpe-css-hrefs RET
>
> then Custom says that the value is just "Set for current session only".
> It is actually saved. What is wrong here?
>
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
> ------- End of forwarded message -------
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [lennart.borgman@gmail.com: How to set and save a defcustom]
2007-03-05 2:54 [lennart.borgman@gmail.com: How to set and save a defcustom] Richard Stallman
@ 2007-03-05 15:16 ` Chong Yidong
0 siblings, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2007-03-05 15:16 UTC (permalink / raw)
To: rms; +Cc: emacs-devel
Richard Stallman <rms@gnu.org> writes:
> Can someone please debug this?
Fixed.
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> Subject: How to set and save a defcustom
> To: Emacs Devel <emacs-devel@gnu.org>
>
> If I do something like this
>
> (customize-set-value 'xmlpe-css-hrefs hrefs)
> (customize-set-variable 'xmlpe-css-hrefs hrefs)
> (customize-save-variable 'xmlpe-css-hrefs hrefs)
>
> and then
>
> M-x customize-option RET xmlpe-css-hrefs RET
>
> then Custom says that the value is just "Set for current session
> only". It is actually saved. What is wrong here?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [lennart.borgman@gmail.com: How to set and save a defcustom]
2007-03-05 9:21 ` Per Abrahamsen
@ 2007-03-05 21:11 ` Chong Yidong
0 siblings, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2007-03-05 21:11 UTC (permalink / raw)
To: Per Abrahamsen; +Cc: Lennart Borgman (gmail), rms, Emacs Devel
"Per Abrahamsen" <per.abrahamsen@gmail.com> writes:
> This patch has not been tested:
This solution is correct. I already installed a similar patch.
> 2007-03-05 Per Abrahamsen <per.abrahamsen@gmail.com>
>
> * cus-edit.el (customize-save-variable): Removed customized value.
>
> *** cus-edit.el.~1.196.~ 2004-12-02 15:15:59.000000000 +0100
> --- cus-edit.el 2007-03-05 10:17:13.000000000 +0100
> ***************
> *** 816,821 ****
> --- 816,822 ----
> current-prefix-arg))
> (funcall (or (get variable 'custom-set) 'set-default) variable value)
> (put variable 'saved-value (list (custom-quote value)))
> + (put variable 'customized-value nil)
> (custom-push-theme 'theme-value variable 'user 'set (list
> (custom-quote value)))
> (cond ((string= comment "")
> (put variable 'variable-comment nil)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-03-05 21:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-05 2:54 [lennart.borgman@gmail.com: How to set and save a defcustom] Richard Stallman
2007-03-05 15:16 ` Chong Yidong
[not found] <E1HMJE0-0003jT-5h@fencepost.gnu.org>
2007-03-05 9:21 ` Per Abrahamsen
2007-03-05 21:11 ` Chong Yidong
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.