From c791a3e9f3d48376e0c1d50e9e2648def494d635 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Wed, 1 Jun 2022 14:50:16 +0200 Subject: [PATCH] Fix up the loaddefs-gen updating logic * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Only do the updating logic if we're really updating. --- lisp/emacs-lisp/loaddefs-gen.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index d6504f798ac..e5a5c21d234 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -543,7 +543,7 @@ If INCLUDE-PACKAGE-VERSION, include package version data." (dolist (fdefs (seq-group-by #'car defs)) (let ((loaddefs-file (car fdefs))) (with-temp-buffer - (if (file-exists-p loaddefs-file) + (if (and updating (file-exists-p loaddefs-file)) (insert-file-contents loaddefs-file) (insert (loaddefs-generate--rubric loaddefs-file nil t)) (search-backward "\f") -- 2.39.2