* bug#25770: delayed-init custom variables are not special
@ 2017-02-17 6:15 Glenn Morris
2017-02-18 3:22 ` Glenn Morris
0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2017-02-17 6:15 UTC (permalink / raw)
To: 25770; +Cc: Stefan Monnier
Package: emacs
Version: 25.1
It seems that defcustoms that use custom-initialize-delay end up not
being special. Eg:
(special-variable-p 'small-temporary-file-directory)
(special-variable-p 'abbrev-file-name)
both return nil.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#25770: delayed-init custom variables are not special
2017-02-17 6:15 bug#25770: delayed-init custom variables are not special Glenn Morris
@ 2017-02-18 3:22 ` Glenn Morris
2017-02-21 9:41 ` Tino Calancha
0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2017-02-18 3:22 UTC (permalink / raw)
To: 25770; +Cc: Stefan Monnier
Glenn Morris wrote:
> It seems that defcustoms that use custom-initialize-delay end up not
> being special.
Maybe something like this?
--- i/lisp/custom.el
+++ w/lisp/custom.el
@@ -764,9 +764,12 @@ custom-reevaluate-setting
Use the :set function to do so. This is useful for customizable options
that are defined before their standard value can really be computed.
E.g. dumped variables whose default depends on run-time information."
- (funcall (or (get symbol 'custom-set) 'set-default)
- symbol
- (eval (car (or (get symbol 'saved-value) (get symbol 'standard-value))))))
+ (let ((val (car (or (get symbol 'saved-value)
+ (get symbol 'standard-value)))))
+ (if (default-boundp symbol)
+ (funcall (or (get symbol 'custom-set) 'set-default) symbol (eval val))
+ (eval `(defvar ,symbol ,val)))))
+
\f
;;; Custom Themes
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#25770: delayed-init custom variables are not special
2017-02-18 3:22 ` Glenn Morris
@ 2017-02-21 9:41 ` Tino Calancha
2017-02-21 18:06 ` Glenn Morris
0 siblings, 1 reply; 5+ messages in thread
From: Tino Calancha @ 2017-02-21 9:41 UTC (permalink / raw)
To: Glenn Morris; +Cc: 25770, Stefan Monnier, tino.calancha
Glenn Morris <rgm@gnu.org> writes:
> Glenn Morris wrote:
>
>> It seems that defcustoms that use custom-initialize-delay end up not
>> being special.
>
> Maybe something like this?
>
> --- i/lisp/custom.el
> +++ w/lisp/custom.el
> @@ -764,9 +764,12 @@ custom-reevaluate-setting
> Use the :set function to do so. This is useful for customizable options
> that are defined before their standard value can really be computed.
> E.g. dumped variables whose default depends on run-time information."
> - (funcall (or (get symbol 'custom-set) 'set-default)
> - symbol
> - (eval (car (or (get symbol 'saved-value) (get symbol 'standard-value))))))
> + (let ((val (car (or (get symbol 'saved-value)
> + (get symbol 'standard-value)))))
> + (if (default-boundp symbol)
> + (funcall (or (get symbol 'custom-set) 'set-default) symbol (eval val))
> + (eval `(defvar ,symbol ,val)))))
> +
After commit 96cea19842b577eb4f2e057d702aea54d736233e
emacs -Q lisp/subr.el
shows no fontification, even though the mode line
says that the buffer is in Emacs Lisp mode.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#25770: delayed-init custom variables are not special
2017-02-21 9:41 ` Tino Calancha
@ 2017-02-21 18:06 ` Glenn Morris
2017-02-21 18:24 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2017-02-21 18:06 UTC (permalink / raw)
To: Tino Calancha; +Cc: 25770, Stefan Monnier
Tino Calancha wrote:
> After commit 96cea19842b577eb4f2e057d702aea54d736233e
> emacs -Q lisp/subr.el
> shows no fontification, even though the mode line
> says that the buffer is in Emacs Lisp mode.
Hmm. Please try 20dda6b.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#25770: delayed-init custom variables are not special
2017-02-21 18:06 ` Glenn Morris
@ 2017-02-21 18:24 ` Eli Zaretskii
0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2017-02-21 18:24 UTC (permalink / raw)
To: Glenn Morris; +Cc: 25770, monnier, tino.calancha
> From: Glenn Morris <rgm@gnu.org>
> Date: Tue, 21 Feb 2017 13:06:14 -0500
> Cc: 25770@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
>
> Tino Calancha wrote:
>
> > After commit 96cea19842b577eb4f2e057d702aea54d736233e
> > emacs -Q lisp/subr.el
> > shows no fontification, even though the mode line
> > says that the buffer is in Emacs Lisp mode.
>
> Hmm. Please try 20dda6b.
Looks good here, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-02-21 18:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-17 6:15 bug#25770: delayed-init custom variables are not special Glenn Morris
2017-02-18 3:22 ` Glenn Morris
2017-02-21 9:41 ` Tino Calancha
2017-02-21 18:06 ` Glenn Morris
2017-02-21 18:24 ` Eli Zaretskii
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.