From a3fcc4ed0fa8a14d151620eccc0490b1a83dbf77 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sun, 20 Nov 2022 15:36:24 +0100 Subject: [PATCH] Don't break when loading VC packages on older Emacs versions * lisp/emacs-lisp/package-vc.el (package-vc--generate-description-file): Append a :kind property instead of modifying the version number. * lisp/emacs-lisp/package.el (package-desc): Remove special handling for "vc annotated" versions. (bug#59404) --- lisp/emacs-lisp/package-vc.el | 3 ++- lisp/emacs-lisp/package.el | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index a999596785b..bf1ea2bdf40 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -334,7 +334,7 @@ asynchronously." (nconc (list 'define-package (symbol-name name) - (cons 'vc (package-vc--version pkg-desc)) + (package-vc--version pkg-desc) (package-desc-summary pkg-desc) (let ((requires (package-desc-reqs pkg-desc))) (list 'quote @@ -344,6 +344,7 @@ asynchronously." (list (car elt) (package-version-join (cadr elt)))) requires)))) + (list :kind 'vc) (package--alist-to-plist-args (package-desc-extras pkg-desc)))) "\n") diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index c1545a28701..e11c5d693e5 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -483,9 +483,7 @@ synchronously." (if (eq 'quote (car requirements)) (nth 1 requirements) requirements))) - (kind (if (eq (car-safe version-string) 'vc) - 'vc - (plist-get rest-plist :kind))) + (kind (plist-get rest-plist :kind)) (archive (plist-get rest-plist :archive)) (extras (let (alist) (while rest-plist -- 2.39.2