]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid destructive manipulation of 'package-vc--archive-spec-alist'
authorPhilip Kaludercic <philipk@posteo.net>
Tue, 15 Nov 2022 09:46:23 +0000 (10:46 +0100)
committerPhilip Kaludercic <philipk@posteo.net>
Thu, 17 Nov 2022 19:55:04 +0000 (20:55 +0100)
* lisp/emacs-lisp/package-vc.el (package-vc--desc->spec): Replace
'mapcar' with 'apply'.  This is done to avoid unintentional cycles.

lisp/emacs-lisp/package-vc.el

index 289f8e37ced6030a301b825abe847809a9e71a22..78d09400c9f9283b49c07a9b5abb513c2a5e24c5 100644 (file)
@@ -218,7 +218,7 @@ name for PKG-DESC."
    (if (package-desc-archive pkg-desc)
        (alist-get (intern (package-desc-archive pkg-desc))
                   package-vc--archive-spec-alist)
-     (mapcan #'append (mapcar #'cdr package-vc--archive-spec-alist)))
+     (apply #'append (mapcar #'cdr package-vc--archive-spec-alist)))
    nil nil #'string=))
 
 (define-inline package-vc--query-spec (pkg-desc prop)