diff options
| author | Glenn Morris | 2014-05-31 19:36:40 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-05-31 19:36:40 -0700 |
| commit | a383d0913e9e40ee895c8bf95c463df9170c6850 (patch) | |
| tree | bbf94a18482212e538b5eab02db0839327b01bef | |
| parent | b5d6fe3bf6e728c82a3ff63723d75519f7853716 (diff) | |
| download | emacs-a383d0913e9e40ee895c8bf95c463df9170c6850.tar.gz emacs-a383d0913e9e40ee895c8bf95c463df9170c6850.zip | |
* 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
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/loadup.el | 15 |
2 files changed, 16 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5b0affbbf2b..f8652020920 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2014-06-01 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * loadup.el (load-prefer-newer): Set non-nil when dumping. (Bug#17629) | ||
| 4 | |||
| 1 | 2014-05-31 Glenn Morris <rgm@gnu.org> | 5 | 2014-05-31 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * files.el (locate-dominating-file): Expand file argument. (Bug#17641) | 7 | * 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 @@ | |||
| 72 | ;; This is a poor man's `last', since we haven't loaded subr.el yet. | 72 | ;; This is a poor man's `last', since we haven't loaded subr.el yet. |
| 73 | (if (or (equal (member "bootstrap" command-line-args) '("bootstrap")) | 73 | (if (or (equal (member "bootstrap" command-line-args) '("bootstrap")) |
| 74 | (equal (member "dump" command-line-args) '("dump"))) | 74 | (equal (member "dump" command-line-args) '("dump"))) |
| 75 | ;; To reduce the size of dumped Emacs, we avoid making huge | 75 | (progn |
| 76 | ;; char-tables. | 76 | ;; To reduce the size of dumped Emacs, we avoid making huge char-tables. |
| 77 | (setq inhibit-load-charset-map t)) | 77 | (setq inhibit-load-charset-map t) |
| 78 | ;; --eval gets handled too late. | ||
| 79 | (defvar load--prefer-newer load-prefer-newer) | ||
| 80 | (setq load-prefer-newer t))) | ||
| 78 | 81 | ||
| 79 | ;; We don't want to have any undo records in the dumped Emacs. | 82 | ;; We don't want to have any undo records in the dumped Emacs. |
| 80 | (set-buffer "*scratch*") | 83 | (set-buffer "*scratch*") |
| @@ -358,6 +361,12 @@ lost after dumping"))) | |||
| 358 | 361 | ||
| 359 | (remove-hook 'after-load-functions (lambda (f) (garbage-collect))) | 362 | (remove-hook 'after-load-functions (lambda (f) (garbage-collect))) |
| 360 | 363 | ||
| 364 | (if (boundp 'load--prefer-newer) | ||
| 365 | (progn | ||
| 366 | (setq load-prefer-newer load--prefer-newer) | ||
| 367 | (put 'load-prefer-newer 'standard-value load--prefer-newer) | ||
| 368 | (makunbound 'load--prefer-newer))) | ||
| 369 | |||
| 361 | (setq inhibit-load-charset-map nil) | 370 | (setq inhibit-load-charset-map nil) |
| 362 | (clear-charset-maps) | 371 | (clear-charset-maps) |
| 363 | (garbage-collect) | 372 | (garbage-collect) |