]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix up the loaddefs-gen updating logic
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 1 Jun 2022 12:50:16 +0000 (14:50 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 1 Jun 2022 12:50:16 +0000 (14:50 +0200)
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Only do the
updating logic if we're really updating.

lisp/emacs-lisp/loaddefs-gen.el

index d6504f798ac5c86b6b4751a201b198c96a16519d..e5a5c21d234fdecd5a4e720ee81d2dc92f5c285b 100644 (file)
@@ -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")