Function: lm-package-needs-footer-line
lm-package-needs-footer-line is a byte-compiled function defined in
lisp-mnt.el.gz.
Signature
(lm-package-needs-footer-line &optional FILE)
Documentation
Return non-nil if package in current buffer needs a footer line.
Footer lines (sometimes referred to as "terminating comments") look like this:
;;; some-cool-package.el ends here
Such lines are required for a package to be installable by package.el in Emacs 29.1 or earlier, but are optional in later versions. If the package depends on a version of Emacs where package.el requires such comments, or if no version requirement is specified, return non-nil.
If optional argument FILE is non-nil, use that file instead of the current buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/lisp-mnt.el.gz
(defun lm-package-needs-footer-line (&optional file)
"Return non-nil if package in current buffer needs a footer line.
Footer lines (sometimes referred to as \"terminating comments\") look
like this:
;;; some-cool-package.el ends here
Such lines are required for a package to be installable by package.el in
Emacs 29.1 or earlier, but are optional in later versions. If the
package depends on a version of Emacs where package.el requires such
comments, or if no version requirement is specified, return non-nil.
If optional argument FILE is non-nil, use that file instead of the
current buffer."
(lm-with-file file
;; 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)))))
(or (null min-emacs)
(version< min-emacs "30.1")))))