all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
To: "emacs-devel@gnu.org discussions" <emacs-devel@gnu.org>
Subject: custom-reevaluate-setting / custom-initialize-delay
Date: Mon, 22 Feb 2010 20:41:44 -0500	[thread overview]
Message-ID: <DCFF7E2D-5388-4B1E-9BB6-674116E807D0@gmail.com> (raw)

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)
 





             reply	other threads:[~2010-02-23  1:41 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-23  1:41 David Reitter [this message]
2010-02-23 18:04 ` custom-reevaluate-setting / custom-initialize-delay 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  5:11         ` bug#5299: " Stefan Monnier
2010-02-24  5:30           ` Drew Adams
2010-02-24 16:30             ` Stefan Monnier
2010-02-24 17:35               ` Drew Adams
2010-02-24 18:51                 ` bug#5299: Default mailer (was: custom-reevaluate-setting / custom-initialize-delay) Stefan Monnier
2010-02-24 20:15                   ` Lennart Borgman
2010-02-24 21:13                   ` Drew Adams
2010-02-24 21:35                     ` bug#5299: Default mailer Stefan Monnier
2010-02-27  3:45                       ` bug#5299: Glenn Morris
2010-02-24  7:15         ` custom-reevaluate-setting / custom-initialize-delay 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DCFF7E2D-5388-4B1E-9BB6-674116E807D0@gmail.com \
    --to=david.reitter@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.