[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
custom-reevaluate-setting / custom-initialize-delay
From: |
David Reitter |
Subject: |
custom-reevaluate-setting / custom-initialize-delay |
Date: |
Mon, 22 Feb 2010 20:41:44 -0500 |
There's a bug in the initialization customization variables when this
initialization is delayed using `custom-initialize-delay' function.
These get init'd during dumping rather than at run-time. The documentation
suggests that it's supposed to happen at run-time.
A symptom of this is that `send-mail-function' is always set to
`sendmail-send-it', because `window-system' is not available during dumping.
This is a regression compared to Emacs 22, where this mechanism worked.
I think the correct fix is to not clear `custom-delayed-init-variables' while
dumping. Possibly, one would want to not initialize the variables at all (see
also the comment in `custom-initialize-delay' w.r.t. evaluating value). The
patch below just implements the variant with the smaller change in behavior.
diff --git a/lisp/startup.el b/lisp/startup.el
index 87f1a00..0c9b190 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -913,10 +913,12 @@ opening the first frame (e.g. open a connection to an X
server).")
;; Re-evaluate predefined variables whose initial value depends on
;; the runtime context.
(mapc 'custom-reevaluate-setting
- ;; Initialize them in the same order they were loaded, in case there
- ;; are dependencies between them.
- (prog1 (nreverse custom-delayed-init-variables)
- (setq custom-delayed-init-variables nil)))
+ ;; Initialize them in the same order they were loaded, in case there
+ ;; are dependencies between them.
+ (prog1 (nreverse custom-delayed-init-variables)
+ (unless (or (member (nth 3 command-line-args) '("dump" "bootstrap"))
+ (member (nth 4 command-line-args) '("dump" "bootstrap")))
+ (setq custom-delayed-init-variables nil))))
(normal-erase-is-backspace-setup-frame)
- custom-reevaluate-setting / custom-initialize-delay,
David Reitter <=