emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 94e984e6700: Make loaddefs-generate slightly more tolerant


From: Robert Pluim
Subject: emacs-29 94e984e6700: Make loaddefs-generate slightly more tolerant
Date: Thu, 4 May 2023 10:03:35 -0400 (EDT)

branch: emacs-29
commit 94e984e6700c805c3aaac6f8d9c56381a8d0673a
Author: Robert Pluim <rpluim@gmail.com>
Commit: Robert Pluim <rpluim@gmail.com>

    Make loaddefs-generate slightly more tolerant
    
    There are packages in the wild, such as vlf-20191126.2250, which have
    entries that are not terminated by three ';', but by two.  Tolerate
    such entries.
    
    * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Search for two
    ';' as a delimiter, not three.  (Bug#63236)
---
 lisp/emacs-lisp/loaddefs-gen.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index a966b1e9f40..2a46fb7a022 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -635,9 +635,12 @@ instead of just updating them with the new/changed 
autoloads."
                     (progn
                       (goto-char (point-max))
                       (search-backward "\f\n" nil t))
-                  ;; Delete the old version of the section.
+                  ;; Delete the old version of the section.  Strictly
+                  ;; speaking this should search for "\n\f\n;;;", but
+                  ;; there are loaddefs files in the wild that only
+                  ;; have two ';;'.  (Bug#63236)
                   (delete-region (match-beginning 0)
-                                 (and (search-forward "\n\f\n;;;")
+                                 (and (search-forward "\n\f\n;;")
                                       (match-beginning 0)))
                   (forward-line -2)))
               (insert head)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]