]> git.eshelyaron.com Git - emacs.git/commitdiff
checkdoc: Library footer must match package.el requirement
authorStefan Kangas <stefan@marxist.se>
Sun, 26 Sep 2021 00:02:52 +0000 (02:02 +0200)
committerStefan Kangas <stefan@marxist.se>
Sun, 26 Sep 2021 09:37:29 +0000 (11:37 +0200)
* lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine):
Don't accept footer format unless it matches the requirement in
package.el.

lisp/emacs-lisp/checkdoc.el

index 74c27343bc4cad3b1f5f462f41cec39995d036f6..24e1ae3f097bbf605c00702987ebbb73180137b6 100644 (file)
@@ -2474,10 +2474,9 @@ Code:, and others referenced in the style guide."
        (save-excursion
          (goto-char (point-max))
          (if (not (re-search-backward
-                   (concat "^;;;[ \t]+" (regexp-quote fn) "\\(" (regexp-quote fe)
-                           "\\)?[ \t]+ends here[ \t]*$"
-                           "\\|^;;;[ \t]+ End of file[ \t]+"
-                           (regexp-quote fn) "\\(" (regexp-quote fe) "\\)?")
+                    ;; This should match the requirement in
+                    ;; `package-buffer-info'.
+                    (concat "^;;; " (regexp-quote (concat fn fe)) " ends here")
                    nil t))
               (if (checkdoc-y-or-n-p "No identifiable footer!  Add one?")
                  (progn