Skip to content

Commit 7a21bdc

Browse files
author
Ken Raeburn
committed
In CANNOT_DUMP builds, allow editing of files named "dump".
* lisp/loadup.el: Perform the "dump" or "bootstrap" actions like calling dump-emacs only if dump-emacs is defined; otherwise, don't treat those command-line argument specially.
1 parent 8ca2bd1 commit 7a21bdc

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

lisp/loadup.el

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@
8585
(message "Using load-path %s" load-path)
8686

8787
;; This is a poor man's `last', since we haven't loaded subr.el yet.
88-
(if (or (equal (member "bootstrap" command-line-args) '("bootstrap"))
89-
(equal (member "dump" command-line-args) '("dump")))
88+
(if (and (fboundp 'dump-emacs)
89+
(or (equal (member "bootstrap" command-line-args) '("bootstrap"))
90+
(equal (member "dump" command-line-args) '("dump"))))
9091
(progn
9192
;; To reduce the size of dumped Emacs, we avoid making huge char-tables.
9293
(setq inhibit-load-charset-map t)
@@ -345,12 +346,14 @@ lost after dumping")))
345346
;; in non-ASCII directories is to manipulate unibyte strings in the
346347
;; current locale's encoding.
347348
(if (and (member (car (last command-line-args)) '("dump" "bootstrap"))
349+
(fboundp 'dump-emacs)
348350
(multibyte-string-p default-directory))
349351
(error "default-directory must be unibyte when dumping Emacs!"))
350352

351353
;; Determine which build number to use
352354
;; based on the executables that now exist.
353355
(if (and (equal (last command-line-args) '("dump"))
356+
(fboundp 'dump-emacs)
354357
(not (eq system-type 'ms-dos)))
355358
(let* ((base (concat "emacs-" emacs-version "."))
356359
(exelen (if (eq system-type 'windows-nt) -4))
@@ -368,7 +371,8 @@ lost after dumping")))
368371

369372

370373
(message "Finding pointers to doc strings...")
371-
(if (equal (last command-line-args) '("dump"))
374+
(if (and (fboundp 'dump-emacs)
375+
(equal (last command-line-args) '("dump")))
372376
(Snarf-documentation "DOC")
373377
(condition-case nil
374378
(Snarf-documentation "DOC")
@@ -437,7 +441,8 @@ lost after dumping")))
437441
;; Make sure we will attempt bidi reordering henceforth.
438442
(setq redisplay--inhibit-bidi nil)
439443

440-
(if (member (car (last command-line-args)) '("dump" "bootstrap"))
444+
(if (and (fboundp 'dump-emacs)
445+
(member (car (last command-line-args)) '("dump" "bootstrap")))
441446
(progn
442447
;; Prevent build-time PATH getting stored in the binary.
443448
;; Mainly cosmetic, but helpful for Guix. (Bug#20330)

0 commit comments

Comments
 (0)