GNU bug report logs - #25770
delayed-init custom variables are not special

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Fri, 17 Feb 2017 06:16:02 UTC

Severity: normal

Found in version 25.1

Fixed in version 26.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25770 in the body.
You can then email your comments to 25770 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org:
bug#25770; Package emacs. (Fri, 17 Feb 2017 06:16:02 GMT) Full text and rfc822 format available.

Message #3 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: submit <at> debbugs.gnu.org
Subject: delayed-init custom variables are not special
Date: Fri, 17 Feb 2017 01:15:49 -0500
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.




Added indication that bug 25770 blocks24655 Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 18 Feb 2017 01:46:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25770; Package emacs. (Sat, 18 Feb 2017 03:23:01 GMT) Full text and rfc822 format available.

Message #8 received at 25770 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 25770 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#25770: delayed-init custom variables are not special
Date: Fri, 17 Feb 2017 22:22:05 -0500
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)))))
+
 
 
 ;;; Custom Themes




bug marked as fixed in version 26.1, send any further explanations to 25770 <at> debbugs.gnu.org and Glenn Morris <rgm <at> gnu.org> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 21 Feb 2017 02:32:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25770; Package emacs. (Tue, 21 Feb 2017 09:42:02 GMT) Full text and rfc822 format available.

Message #13 received at 25770 <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <tino.calancha <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 25770 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 tino.calancha <at> gmail.com
Subject: Re: bug#25770: delayed-init custom variables are not special
Date: Tue, 21 Feb 2017 18:41:42 +0900
Glenn Morris <rgm <at> 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. 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25770; Package emacs. (Tue, 21 Feb 2017 18:07:01 GMT) Full text and rfc822 format available.

Message #16 received at 25770 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: 25770 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#25770: delayed-init custom variables are not special
Date: Tue, 21 Feb 2017 13:06:14 -0500
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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25770; Package emacs. (Tue, 21 Feb 2017 18:26:01 GMT) Full text and rfc822 format available.

Message #19 received at 25770 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 25770 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, tino.calancha <at> gmail.com
Subject: Re: bug#25770: delayed-init custom variables are not special
Date: Tue, 21 Feb 2017 20:24:44 +0200
> From: Glenn Morris <rgm <at> gnu.org>
> Date: Tue, 21 Feb 2017 13:06:14 -0500
> Cc: 25770 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> 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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 22 Mar 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 91 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.