From: Glenn Morris Date: Sun, 1 Jun 2014 02:36:40 +0000 (-0700) Subject: * loadup.el (load-prefer-newer): Set non-nil when dumping. X-Git-Tag: emacs-25.0.90~2612^2~709^2~830 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a383d0913e9e40ee895c8bf95c463df9170c6850;p=emacs.git * loadup.el (load-prefer-newer): Set non-nil when dumping. --eval doesn't work (or not early enough) during dumping. Making load-prefer-newer non-nil by default would be simpler... Fixes: debbugs:17629 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5b0affbbf2b..f8652020920 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-06-01 Glenn Morris + + * loadup.el (load-prefer-newer): Set non-nil when dumping. (Bug#17629) + 2014-05-31 Glenn Morris * files.el (locate-dominating-file): Expand file argument. (Bug#17641) diff --git a/lisp/loadup.el b/lisp/loadup.el index 89fcaa30b0c..b911e9f1768 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -72,9 +72,12 @@ ;; This is a poor man's `last', since we haven't loaded subr.el yet. (if (or (equal (member "bootstrap" command-line-args) '("bootstrap")) (equal (member "dump" command-line-args) '("dump"))) - ;; To reduce the size of dumped Emacs, we avoid making huge - ;; char-tables. - (setq inhibit-load-charset-map t)) + (progn + ;; To reduce the size of dumped Emacs, we avoid making huge char-tables. + (setq inhibit-load-charset-map t) + ;; --eval gets handled too late. + (defvar load--prefer-newer load-prefer-newer) + (setq load-prefer-newer t))) ;; We don't want to have any undo records in the dumped Emacs. (set-buffer "*scratch*") @@ -358,6 +361,12 @@ lost after dumping"))) (remove-hook 'after-load-functions (lambda (f) (garbage-collect))) +(if (boundp 'load--prefer-newer) + (progn + (setq load-prefer-newer load--prefer-newer) + (put 'load-prefer-newer 'standard-value load--prefer-newer) + (makunbound 'load--prefer-newer))) + (setq inhibit-load-charset-map nil) (clear-charset-maps) (garbage-collect)