From 90948eb9d7e2f0770533f71931f4427757c2ad82 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 26 Sep 2021 02:02:52 +0200 Subject: [PATCH] checkdoc: Library footer must match package.el requirement * 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 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 74c27343bc4..24e1ae3f097 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -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 -- 2.39.2