[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/raeburn-startup d987a68 39/43: Don't show the buil
From: |
Ken Raeburn |
Subject: |
[Emacs-diffs] scratch/raeburn-startup d987a68 39/43: Don't show the build directory in load-history. |
Date: |
Mon, 31 Jul 2017 02:11:05 -0400 (EDT) |
branch: scratch/raeburn-startup
commit d987a68fec63fc8cd7ed5dd4cd717d6edda4841e
Author: Ken Raeburn <address@hidden>
Commit: Ken Raeburn <address@hidden>
Don't show the build directory in load-history.
* lisp/loadup.el: Before dumping, pre-process a copy of load-history
to make the pathnames relative and write out the modified version.
---
lisp/loadup.el | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/lisp/loadup.el b/lisp/loadup.el
index b8e84b8..3de496d 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -542,6 +542,7 @@ lost after dumping")))
user-real-login-name
system-name
command-line-args noninteractive
+ load-history
;; Any let-bound variables during
;; dump process will be useless.
faces coding-systems coding-system-aliases
@@ -651,6 +652,45 @@ lost after dumping")))
(push (cons s (get-charset-property s :name))
charset-aliases))))
obarray)
+
+ ;; Convert preloaded file names in load-history to relative
+ (let ((simple-file-name
+ ;; Look for simple.el or simple.elc and use their directory
+ ;; as the place where all Lisp files live.
+ (locate-file "simple" load-path (get-load-suffixes)))
+ lisp-dir lisp-dir-length)
+ ;; Don't abort if simple.el cannot be found, but print a warning.
+ ;; Although in most usage we are going to cryptically abort a moment
+ ;; later anyway, due to missing required bidi data files (eg
bug#13430).
+ (if (null simple-file-name)
+ (let ((standard-output 'external-debugging-output)
+ (lispdir (expand-file-name "../lisp" data-directory)))
+ (princ "Warning: Could not find simple.el or simple.elc")
+ (terpri)
+ (when (getenv "EMACSLOADPATH")
+ (princ "The EMACSLOADPATH environment variable is set, \
+please check its value")
+ (terpri))
+ (unless (file-readable-p lispdir)
+ (princ (format "Lisp directory %s not readable?" lispdir))
+ (terpri)))
+ (setq lisp-dir (file-truename (file-name-directory
simple-file-name)))
+ (setq lisp-dir-length (length lisp-dir))
+ (let ((fake-load-history
+ (mapcar (lambda (elt)
+ (if (and (stringp (car elt))
+ (file-name-absolute-p (car elt))
+ (> (length (car elt)) lisp-dir-length)
+ (string-equal lisp-dir
+ (substring (car elt) 0
lisp-dir-length))
+ )
+ (cons (substring (car elt) lisp-dir-length)
+ (cdr elt))
+ elt))
+ load-history)))
+ (push `(setq load-history ',fake-load-history)
+ cmds))))
+
(message "Dumping into dumped.elc...printing...")
(with-current-buffer (generate-new-buffer "dumped.elc")
(setq default-directory invocation-directory)
- [Emacs-diffs] scratch/raeburn-startup e69daac 21/43: Fix build on Cygwin, (continued)
- [Emacs-diffs] scratch/raeburn-startup e69daac 21/43: Fix build on Cygwin, Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup 98025ef 31/43: Retain overlay properties when dumping., Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup f6793d2 41/43: Don't use byte-compile-dynamic for stuff we're going to load., Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup 9664101 16/43: Load dumped.elc quietly., Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup cc22b26 19/43: Don't save internal--text-quoting-flag., Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup 3da90ae 32/43: Make watchers dumpable., Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup 363abae 30/43: Support dumping variable aliases., Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup 291e585 24/43: Update load-path and purify-flag even if not bootstrapping., Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup 2c96099 27/43: Don't dump artifacts of the dump process., Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup bd8bcb3 29/43: Load uniquify after dump/reload., Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup d987a68 39/43: Don't show the build directory in load-history.,
Ken Raeburn <=
- [Emacs-diffs] scratch/raeburn-startup de45051 37/43: Fix use of "-l" on command line after installation., Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup 272c874 23/43: Fix startup on MS-Windows, Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup d95042a 35/43: ; Add comment regarding silent loading of dumped.elc., Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup 5d4b7f9 26/43: Dump and restore empty abbrev tables., Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup a0ac557 28/43: Clear out doc strings matching DOC file before dumping., Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup 7764bd73 36/43: * lisp/loadup.el: Load uniquify quietly. Put fewer newlines in dump file., Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup 6faa843 20/43: Load documentation at startup., Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup 43dcdd3 25/43: Load cl-macs, needed for cl-labels., Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup 761346d 34/43: Use CANNOT_DUMP mode., Ken Raeburn, 2017/07/31
- [Emacs-diffs] scratch/raeburn-startup dbdfea8 33/43: Don't check for dump-emacs being bound., Ken Raeburn, 2017/07/31