Commit a383d091 authored by Glenn Morris's avatar Glenn Morris
Browse files

* 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
parent b5d6fe3b
2014-06-01 Glenn Morris <rgm@gnu.org>
* loadup.el (load-prefer-newer): Set non-nil when dumping. (Bug#17629)
2014-05-31 Glenn Morris <rgm@gnu.org> 2014-05-31 Glenn Morris <rgm@gnu.org>
   
* files.el (locate-dominating-file): Expand file argument. (Bug#17641) * files.el (locate-dominating-file): Expand file argument. (Bug#17641)
......
...@@ -72,9 +72,12 @@ ...@@ -72,9 +72,12 @@
;; This is a poor man's `last', since we haven't loaded subr.el yet. ;; This is a poor man's `last', since we haven't loaded subr.el yet.
(if (or (equal (member "bootstrap" command-line-args) '("bootstrap")) (if (or (equal (member "bootstrap" command-line-args) '("bootstrap"))
(equal (member "dump" command-line-args) '("dump"))) (equal (member "dump" command-line-args) '("dump")))
;; To reduce the size of dumped Emacs, we avoid making huge (progn
;; char-tables. ;; To reduce the size of dumped Emacs, we avoid making huge char-tables.
(setq inhibit-load-charset-map t)) (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. ;; We don't want to have any undo records in the dumped Emacs.
(set-buffer "*scratch*") (set-buffer "*scratch*")
...@@ -358,6 +361,12 @@ lost after dumping"))) ...@@ -358,6 +361,12 @@ lost after dumping")))
(remove-hook 'after-load-functions (lambda (f) (garbage-collect))) (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) (setq inhibit-load-charset-map nil)
(clear-charset-maps) (clear-charset-maps)
(garbage-collect) (garbage-collect)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment