]> git.eshelyaron.com Git - emacs.git/commitdiff
Make loaddefs-generate more resilient
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 4 Oct 2022 11:04:16 +0000 (13:04 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 4 Oct 2022 11:04:16 +0000 (13:04 +0200)
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Don't bug
out when there's an existing loaddefs file that's not formatted
properly (bug#58280).

lisp/emacs-lisp/loaddefs-gen.el

index 095d6b14e630028afb80984f0663510a9cd518eb..964d23c770e0be6c3b40062681b2815479998d40 100644 (file)
@@ -632,7 +632,7 @@ instead of just updating them with the new/changed autoloads."
                       ;; It's a new file; put the data at the end.
                       (progn
                         (goto-char (point-max))
-                        (search-backward "\f\n"))
+                        (search-backward "\f\n" nil t))
                     ;; Delete the old version of the section.
                     (delete-region (match-beginning 0)
                                    (and (search-forward "\n\f\n;;;")