]> git.eshelyaron.com Git - emacs.git/commitdiff
cus-start.el: Fix bug#78637
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 24 Jun 2025 22:16:04 +0000 (18:16 -0400)
committerEshel Yaron <me@eshelyaron.com>
Wed, 23 Jul 2025 19:16:01 +0000 (21:16 +0200)
* lisp/cus-start.el <toplevel>: Test `dump-mode` rather than
`after-init-time` for `custom-delayed-init-variables`.

(cherry picked from commit 189ae7b1ed1a243db815560fffa71e9b8771ecb4)

lisp/cus-start.el

index 2a75817dc85c576fe1366c3f8c314ea6bafaf678..7e4f1a2c987059fcb28bf7f01a216269fd07e029 100644 (file)
@@ -939,19 +939,18 @@ since it could result in memory overflow and make Emacs crash."
          (put symbol 'custom-set (cadr prop)))
       ;; This is used by describe-variable.
       (if version (put symbol 'custom-version version))
-      ;; Don't re-add to custom-delayed-init-variables post-startup.
-      (unless after-init-time
-       ;; Note this is the _only_ initialize property we handle.
-       (if (eq (cadr (memq :initialize rest)) #'custom-initialize-delay)
-           ;; These vars are defined early and should hence be initialized
-           ;; early, even if this file happens to be loaded late.  so add them
-           ;; to the end of custom-delayed-init-variables.  Otherwise,
-           ;; auto-save-file-name-transforms will appear in customize-rogue.
-           (add-to-list 'custom-delayed-init-variables symbol 'append)))
       ;; If this is NOT while dumping Emacs, set up the rest of the
       ;; customization info.  This is the stuff that is not needed
       ;; until someone does M-x customize etc.
-      (unless dump-mode
+      (if dump-mode
+         ;; Don't re-add to custom-delayed-init-variables post-startup.
+         ;; Note this is the _only_ initialize property we handle.
+         (if (eq (cadr (memq :initialize rest)) #'custom-initialize-delay)
+             ;; These vars are defined early and should hence be initialized
+             ;; early, even if this file happens to be loaded late.  so add
+              ;; them to the end of custom-delayed-init-variables.  Otherwise,
+             ;; auto-save-file-name-transforms will appear in customize-rogue.
+             (add-to-list 'custom-delayed-init-variables symbol 'append))
        ;; Add it to the right group(s).
        (if (listp group)
            (dolist (g group)