1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Fix use-package :vc keyword when byte-compiled

* lisp/use-package/use-package-core.el (use-package-handler/:vc):
Return the new 'body'. Otherwise, the entire package declaration gets
dropped when byte-compiling.
* test/lisp/use-package/use-package-tests.el
(use-package-test-handler/:vc-6): test it.
This commit is contained in:
Steven Allen 2023-05-16 16:07:36 -07:00 committed by Eli Zaretskii
parent f947a0219b
commit 8d6dd1682e
2 changed files with 13 additions and 1 deletions

View file

@ -1619,7 +1619,8 @@ Also see the Info node `(use-package) Creating an extension'."
;; See `use-package-handler/:ensure' for an explanation.
(if (bound-and-true-p byte-compile-current-file)
(funcall #'use-package-vc-install arg local-path) ; compile time
(push `(use-package-vc-install ',arg ,local-path) body)))) ; runtime
(push `(use-package-vc-install ',arg ,local-path) body)) ; runtime
body))
(defun use-package-normalize--vc-arg (arg)
"Normalize possible arguments to the `:vc' keyword.