Drop footer line warning for packages requiring Emacs 30.1
The reason for warning about a missing footer line (";;; foo.el ends here") is that package.el up until version 27.1 would refuse to install a package without it. Emacs 27.1 or later will install such packages, but will issue a warning, the purpose of which is to encourage package authors not to break backwards-compatibility. However, if the minimum required Emacs version for a package is 30.1, we do not need to worry about compatibility with earlier versions of Emacs -- the package author has already explicitly said that the package will not work on earlier versions. For such packages, there is no need to warn about a missing footer line. In the future, this warning could be removed, but it is premature to do that now. (See Bug#26490.) Thus, for packages that does not specify a minimum version of Emacs, we continue to issue the warning. We will also continue to warn for packages requiring Emacs 27 to 29, since those versions will themselves warn if the footer is missing. * lisp/emacs-lisp/package.el (package-buffer-info): Don't warn if the footer line is missing for packages requiring Emacs 30.1 or later.
This commit is contained in:
parent
bb5399e3cd
commit
e84493eae9
1 changed files with 8 additions and 2 deletions
|
@ -1173,8 +1173,14 @@ boundaries."
|
|||
;; requirement for a "footer line" without unduly impacting users
|
||||
;; on earlier Emacs versions. See Bug#26490 for more details.
|
||||
(unless (search-forward (concat ";;; " file-name ".el ends here") nil 'move)
|
||||
(lwarn '(package package-format) :warning
|
||||
"Package lacks a terminating comment"))
|
||||
;; Starting in Emacs 30.1, avoid warning if the minimum Emacs
|
||||
;; version is specified as 30.1 or later.
|
||||
(let ((min-emacs (cadar (seq-filter (lambda (x) (eq (car x) 'emacs))
|
||||
(lm-package-requires)))))
|
||||
(when (or (null min-emacs)
|
||||
(version< min-emacs "30.1"))
|
||||
(lwarn '(package package-format) :warning
|
||||
"Package lacks a terminating comment"))))
|
||||
;; Try to include a trailing newline.
|
||||
(forward-line)
|
||||
(narrow-to-region start (point))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue