unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* custom-reevaluate-setting / custom-initialize-delay
@ 2010-02-23  1:41 David Reitter
  2010-02-23 18:04 ` Glenn Morris
  2010-02-24 16:45 ` Stefan Monnier
  0 siblings, 2 replies; 28+ messages in thread
From: David Reitter @ 2010-02-23  1:41 UTC (permalink / raw)
  To: emacs-devel@gnu.org discussions

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)
 





^ permalink raw reply related	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2010-02-26 17:54 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-23  1:41 custom-reevaluate-setting / custom-initialize-delay David Reitter
2010-02-23 18:04 ` Glenn Morris
2010-02-23 18:40   ` David Reitter
2010-02-24  1:14     ` Glenn Morris
2010-02-24  3:47       ` David Reitter
2010-02-26  4:45       ` Glenn Morris
2010-02-23 18:42   ` Eli Zaretskii
2010-02-23 18:49   ` Eli Zaretskii
2010-02-23 19:08     ` Drew Adams
2010-02-24  4:14       ` Eli Zaretskii
2010-02-24  4:19         ` Drew Adams
2010-02-24  3:09     ` Glenn Morris
2010-02-24  4:15       ` Eli Zaretskii
2010-02-24  4:15       ` Drew Adams
2010-02-24  7:15         ` Reiner Steib
2010-02-24 16:29           ` Drew Adams
2010-02-25  4:21             ` Eli Zaretskii
2010-02-25  6:47               ` Drew Adams
2010-02-26 14:26                 ` Stefan Monnier
2010-02-26 15:14                   ` Drew Adams
2010-02-26 17:34                     ` Stefan Monnier
2010-02-26 17:54                       ` Drew Adams
2010-02-24  4:17       ` Eli Zaretskii
2010-02-24  4:22         ` Drew Adams
2010-02-24  4:26           ` Drew Adams
2010-02-24  9:46             ` Lennart Borgman
2010-02-24 16:45 ` Stefan Monnier
2010-02-24 18:58   ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).