[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Request to add Package to GNU ELPA
From: |
Philip Kaludercic |
Subject: |
Re: Request to add Package to GNU ELPA |
Date: |
Wed, 05 Apr 2023 21:08:00 +0000 |
Philip Kaludercic <philipk@posteo.net> writes:
> 1. Update package.el to be published on ELPA
It might be that this would be enough to publish package.el with support
back to 27.1, with the help of Compat:
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 0258ed52bee..520e02f4c33 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -5,9 +5,12 @@
;; Author: Tom Tromey <tromey@redhat.com>
;; Daniel Hackney <dan@haxney.org>
;; Created: 10 Mar 2007
-;; Version: 1.1.0
+;; Version: 1.1.1
;; Keywords: tools
-;; Package-Requires: ((tabulated-list "1.0"))
+;; Package-Requires: ((emacs "27.1") (compat "29.1.0.0"))
+
+;; 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 'tabulated-list)
@@ -1124,7 +1128,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))))
@@ -1160,9 +1165,9 @@ package--prepare-dependencies
(declare-function lm-header "lisp-mnt" (header))
(declare-function lm-header-multiline "lisp-mnt" (header))
-(declare-function lm-website "lisp-mnt" (&optional file))
+(declare-function lm-homepage "lisp-mnt" (&optional file))
(declare-function lm-keywords-list "lisp-mnt" (&optional file))
-(declare-function lm-maintainers "lisp-mnt" (&optional file))
+(declare-function lm-maintainer "lisp-mnt" (&optional file))
(declare-function lm-authors "lisp-mnt" (&optional file))
(defun package-buffer-info ()
@@ -1195,7 +1200,7 @@ package-buffer-info
(or (lm-header "package-version") (lm-header "version")))
(pkg-version (package-strip-rcs-id version-info))
(keywords (lm-keywords-list))
- (website (lm-website)))
+ (website (lm-homepage)))
(unless pkg-version
(if version-info
(error "Unrecognized package version: %s" version-info)
@@ -1208,10 +1213,13 @@ package-buffer-info
:kind 'single
:url website
:keywords keywords
- :maintainer
+ :maintainer (lm-maintainer)
;; For backward compatibility, use a single string if there's only
;; one maintainer (the most common case).
- (let ((maints (lm-maintainers))) (if (cdr maints) maints (car maints)))
+ (if (fboundp 'lm-maintainers)
+ (let ((maints (lm-maintainers)))
+ (if (cdr maints) maints (car maints)))
+ (lm-maintainer))
:authors (lm-authors)))))
(defun package--read-pkg-desc (kind)
@@ -2302,8 +2310,6 @@ package-strip-rcs-id
;; to make sure we use a "canonical name"!
(if l (package-version-join l)))))
-(declare-function lm-website "lisp-mnt" (&optional file))
-
;;;###autoload
(defun package-install-from-buffer ()
"Install a package from the current buffer.
@@ -2902,8 +2908,11 @@ describe-package-1
;; Insert news if available.
(when news
- (insert "\n" (make-separator-line) "\n"
- (propertize "* News" 'face 'package-help-section-name)
+ (newline)
+ (when (fboundp 'make-separator-line)
+ (insert (make-separator-line))
+ (newline))
+ (insert (propertize "* News" 'face 'package-help-section-name)
"\n\n")
(insert-file-contents news))
@@ -4571,8 +4580,11 @@ package-report-bug
(dolist (ent (get (cdr group) 'custom-group))
(when (and (custom-variable-p (car ent))
(boundp (car ent))
- (not (eq (custom--standard-value (car ent))
- (default-toplevel-value (car ent))))
+ (not (eq
+ ;; We are not using `custom--standard-value'
+ ;; to retain compatibility for Emacs 27.
+ (eval (car (get (car ent) 'standard-value)) t)
+ (default-toplevel-value (car ent))))
(file-in-directory-p (car group) (package-desc-dir desc)))
(push (car ent) vars))))
(dlet ((reporter-prompt-for-summary-p t))
- Re: Request to add Package to GNU ELPA, Philip Kaludercic, 2023/04/05
- Re: Request to add Package to GNU ELPA, Jonas Bernoulli, 2023/04/05
- Re: Request to add Package to GNU ELPA, Philip Kaludercic, 2023/04/05
- Re: Request to add Package to GNU ELPA, Philip Kaludercic, 2023/04/05
- Re: Request to add Package to GNU ELPA,
Philip Kaludercic <=
- Re: Request to add Package to GNU ELPA, Philip Kaludercic, 2023/04/06
- Re: Request to add Package to GNU ELPA, Stefan Monnier, 2023/04/06
- Re: Request to add Package to GNU ELPA, Philip Kaludercic, 2023/04/07
- Re: Request to add Package to GNU ELPA, Stefan Monnier, 2023/04/07
- Re: Request to add Package to GNU ELPA, Philip Kaludercic, 2023/04/08
- Re: Request to add Package to GNU ELPA, Stefan Monnier, 2023/04/09
- Re: Request to add Package to GNU ELPA, Philip Kaludercic, 2023/04/09
- Re: Request to add Package to GNU ELPA, Philip Kaludercic, 2023/04/07
- Re: Request to add Package to GNU ELPA, Jonas Bernoulli, 2023/04/06
Re: Adding package-vc to ELPA, Philip Kaludercic, 2023/04/17