Subject: Re: bug#48492: [PATCH] Fix wrong-type-argument error while loading pdump file

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 18 May 2021 16:37:52 +0200

Gong Qijian <[email-masked]> writes:

> This issue was introduced by commit 2fb271ca "Fix unload+reload of
> files using `custom-initialize-delay` (bug#47072)" which changed the
> initial value of `custom-delayed-init-variables` from nil to t.

[...]

> -  (setq custom-delayed-init-variables
> -        ;; Initialize them in the same order they were loaded, in case there
> -        ;; are dependencies between them.
> -        (nreverse custom-delayed-init-variables))
> -  (mapc #'custom-reevaluate-setting custom-delayed-init-variables)
> -  (setq custom-delayed-init-variables t)
> +  (when (listp custom-delayed-init-variables)
> +    (setq custom-delayed-init-variables
> +          ;; Initialize them in the same order they were loaded, in case there
> +          ;; are dependencies between them.
> +          (nreverse custom-delayed-init-variables))
> +    (mapc #'custom-reevaluate-setting custom-delayed-init-variables)
> +    (setq custom-delayed-init-variables t))

Thanks -- I've applied this with a change: The pre-patched version would
set `custom-delayed-init-variables' to t always, but with this patch,
it's only set if `custom-delayed-init-variables' is a proper list.  So I
moved the last setq out of the `when'.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no