From: Lars Ingebrigtsen Date: Wed, 1 Jun 2022 12:50:16 +0000 (+0200) Subject: Fix up the loaddefs-gen updating logic X-Git-Tag: emacs-29.0.90~1910^2~295^2~15 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c791a3e9f3d48376e0c1d50e9e2648def494d635;p=emacs.git 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. --- 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")