From 082b431e62b5d1f835149874df95941268c8a763 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 27 Feb 2021 12:28:17 -0500 Subject: [PATCH] * 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. --- lisp/emacs-lisp/bytecomp.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)) -- 2.39.2