]> git.eshelyaron.com Git - emacs.git/commitdiff
Make lm-verify footer checking more strict
authorStefan Kangas <stefankangas@gmail.com>
Tue, 8 Aug 2023 17:04:48 +0000 (19:04 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Tue, 8 Aug 2023 17:05:01 +0000 (19:05 +0200)
* lisp/emacs-lisp/lisp-mnt.el (lm-verify): Make file footer regexp
more strict to match requirement in old versions of package.el (now
only a warning).

lisp/emacs-lisp/lisp-mnt.el

index 67c9db29b7f2b4a44de87382732a9d94e63fc15c..c21b67ed37ee7e42ff45276177685ede5cdfa56c 100644 (file)
@@ -519,6 +519,7 @@ says display \"OK\" in temp buffer for files that have no problems.
 Optional argument VERBOSE specifies verbosity level.
 Optional argument NON-FSF-OK if non-nil means a non-FSF
 copyright notice is allowed."
+  ;; FIXME: Make obsolete in favor of checkdoc?
   (interactive (list nil nil t))
   (let* ((ret (and verbose "Ok"))
         name)
@@ -562,9 +563,8 @@ copyright notice is allowed."
                  (goto-char (point-max))
                  (not
                   (re-search-backward
-                   (concat "^;;;[ \t]+" name "[ \t]+ends here[ \t]*$"
-                           "\\|^;;;[ \t]+ End of file[ \t]+" name)
-                   nil t)))
+                    (rx bol ";;; " (eval name) " ends here")
+                    nil t)))
                "Can't find the footer line")
               ((not (and (lm-copyright-mark) (lm-crack-copyright)))
                "Can't find a valid copyright notice")