(declare-function lm-keywords-list "lisp-mnt" (&optional file))
(declare-function lm-maintainers "lisp-mnt" (&optional file))
(declare-function lm-authors "lisp-mnt" (&optional file))
-(declare-function lm-package-needs-footer-line "lisp-mnt" (&optional file))
(defun package-buffer-info ()
"Return a `package-desc' describing the package in the current buffer.
(unless (re-search-forward "^;;; \\([^ ]*\\)\\.el ---[ \t]*\\(.*?\\)[ \t]*\\(-\\*-.*-\\*-[ \t]*\\)?$" nil t)
(error "Package lacks a file header"))
(let ((file-name (match-string-no-properties 1))
- (desc (match-string-no-properties 2))
- (start (line-beginning-position)))
+ (desc (match-string-no-properties 2)))
(require 'lisp-mnt)
- ;; This warning was added in Emacs 27.1, and should be removed at
- ;; the earliest in version 31.1. The idea is to phase out the
- ;; 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)
- (when (lm-package-needs-footer-line)
- (lwarn '(package package-format) :warning
- "Package lacks a terminating comment")))
- ;; Try to include a trailing newline.
- (forward-line)
- (narrow-to-region start (point))
;; Use some headers we've invented to drive the process.
(let* (;; Prefer Package-Version; if defined, the package author
;; probably wants us to use it. Otherwise try Version.
(keywords (lm-keywords-list))
(website (lm-website)))
(unless pkg-version
- (if version-info
- (error "Unrecognized package version: %s" version-info)
- (error "Package lacks a \"Version\" or \"Package-Version\" header")))
+ (if version-info
+ (error "Unrecognized package version: %s" version-info)
+ (error "Package lacks a \"Version\" or \"Package-Version\" header")))
(package-desc-from-define
file-name pkg-version desc
(lm-package-requires)