Subject: Re: bug#25770: delayed-init custom variables are not special

From: Tino Calancha <[email-masked]>
Date: Tue, 21 Feb 2017 18:41:42 +0900

Glenn Morris <[email-masked]> 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.