GNU bug report logs -
#77075
[PATCH] Prepare package.el to be published on GNU ELPA
Previous Next
Full log
Message #8 received at 77075 <at> debbugs.gnu.org (full text, mbox):
Hi Philip,
a few comments below.
> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
> index 8d2e2f09108..7a69e680880 100644
> --- a/lisp/emacs-lisp/package.el
> +++ b/lisp/emacs-lisp/package.el
> @@ -5,9 +5,12 @@
> ;; Author: Tom Tromey <tromey <at> redhat.com>
> ;; Daniel Hackney <dan <at> haxney.org>
> ;; Created: 10 Mar 2007
> -;; Version: 1.1.0
> +;; Version: 1.1.1-pre
> ;; Keywords: tools
> -;; Package-Requires: ((tabulated-list "1.0"))
> +;; Package-Requires: ((emacs "26.1") (compat "29"))
I suggest to require the newest Compat 30.
> +;; This is a GNU ELPA :core package. Avoid functionality that is not
> +;; compatible with the version of Emacs recorded above.
>
> ;; This file is part of GNU Emacs.
>
> @@ -147,6 +150,7 @@
> (eval-when-compile (require 'subr-x))
> (eval-when-compile (require 'epg)) ;For setf accessors.
> (eval-when-compile (require 'inline)) ;For `define-inline'
> +(require 'compat nil 'noerror)
> (require 'seq)
(require 'compat) without the noerror argument should work, since we
have the compat.el stub in Emacs.
> (require 'tabulated-list)
> @@ -1151,7 +1155,8 @@ package--native-compile-async
> "Native compile installed package PKG-DESC asynchronously.
> This assumes that `pkg-desc' has already been activated with
> `package-activate-1'."
> - (when (native-comp-available-p)
> + (when (and (fboundp 'native-comp-available-p)
> + (native-comp-available-p))
> (let ((warning-minimum-level :error))
> (native-compile-async (package-desc-dir pkg-desc) t))))
`native-comp-available-p' is provided by Compat. You can use it
directly. It aliases `ignore' on Emacs 27 and older.
> ;; Insert news if available.
> (when news
> - (insert "\n" (make-separator-line) "\n"
> - (propertize "* News" 'face 'package-help-section-name)
> + (insert "\n" (make-separator-line) "\n")
> + (when (fboundp 'make-separator-line)
> + (insert (make-separator-line) "\n"))
> + (insert (propertize "* News" 'face 'package-help-section-name)
> "\n\n")
> (insert-file-contents news))
`make-separator-line' is provided by Compat.
Daniel
This bug report was last modified 84 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.