From: Stefan Monnier Date: Sat, 27 Feb 2021 17:28:17 +0000 (-0500) Subject: * lisp/emacs-lisp/bytecomp.el: Fix minor regression introduced by pdump X-Git-Tag: emacs-28.0.90~3514 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=082b431e62b5d1f835149874df95941268c8a763;p=emacs.git * lisp/emacs-lisp/bytecomp.el: Fix minor regression introduced by pdump After `rm **/*.elc; make` we'd sometimes get loads and loads of unnecessary "Reloading ...". (byte-compile-refresh-preloaded): Don't reload files that are more recent than `temacs` but older than the `.pdmp` file. --- diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index f85979579ff..a2fe37a1ee5 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -5225,8 +5225,9 @@ already up-to-date." "Reload any Lisp file that was changed since Emacs was dumped. Use with caution." (let* ((argv0 (car command-line-args)) - (emacs-file (executable-find argv0))) - (if (not (and emacs-file (file-executable-p emacs-file))) + (emacs-file (or (cdr (nth 2 (pdumper-stats))) + (executable-find argv0)))) + (if (not (and emacs-file (file-exists-p emacs-file))) (message "Can't find %s to refresh preloaded Lisp files" argv0) (dolist (f (reverse load-history)) (setq f (car f))