package-buffer-info: Move 'require' earlier
authorStefan Kangas <stefankangas@gmail.com>
Sat, 6 Jul 2024 13:19:10 +0000 (15:19 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Sat, 6 Jul 2024 13:22:20 +0000 (15:22 +0200)
* lisp/emacs-lisp/package.el (package-buffer-info):
Move 'require' earlier, before it is needed.

lisp/emacs-lisp/package.el

index fac824d44a47677227a870c8d55da8b29e4d6fe0..53d04b0d5ec2568aed835d397a5dc28d62e1e651 100644 (file)
@@ -1174,6 +1174,7 @@ boundaries."
   (let ((file-name (match-string-no-properties 1))
         (desc      (match-string-no-properties 2))
         (start     (line-beginning-position)))
+    (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
@@ -1190,7 +1191,6 @@ boundaries."
     ;; Try to include a trailing newline.
     (forward-line)
     (narrow-to-region start (point))
-    (require 'lisp-mnt)
     ;; 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.