Subject: bug#49507: 28.0.50; macOS: Symbol’s value as variable is void: lock-file-name-transforms

From: Eli Zaretskii <[email-masked]>
Date: Sun, 11 Jul 2021 09:21:23 +0300

> From: Naofumi Yasufuku <[email-masked]>
> Date: Sun, 11 Jul 2021 07:42:15 +0900
> Cc: [email-masked]
> 
> I found that the following simple `lock-file-name-transforms' change
> can also avoid this error:
> 
> ----
>  lisp/files.el | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/lisp/files.el b/lisp/files.el
> index 0dfcab8f89..894a06e6e7 100644
> --- a/lisp/files.el
> +++ b/lisp/files.el
> @@ -424,7 +424,6 @@ lock-file-name-transforms
>    :type '(repeat (list (regexp :tag "Regexp")
>                         (string :tag "Replacement")
>  		       (boolean :tag "Uniquify")))
> -  :initialize 'custom-initialize-delay
>    :version "28.1")

Ah, I see the problem.  Defcustom's that are marked with
'custom-initialize-delay are evaluated early in the process of
restoring from the pdumper file, when the code of files.el was not yet
loaded.

Lars, why did you use this :initialize tag here?