GNU bug report logs - #63541
[PATCH] ; Fix use-package :vc keyword when byte-compiled

Previous Next

Package: emacs;

Reported by: Steven Allen <steven <at> stebalien.com>

Date: Tue, 16 May 2023 23:13:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Philip Kaludercic <philipk <at> posteo.net>
To: Tony Zorman <soliditsallgood <at> mailbox.org>
Cc: 63541 <at> debbugs.gnu.org, Steven Allen <steven <at> stebalien.com>
Subject: bug#63541: [PATCH] ; Fix use-package :vc keyword when byte-compiled
Date: Sat, 20 May 2023 16:50:18 +0000
Tony Zorman <soliditsallgood <at> mailbox.org> writes:

> On Thu, May 18 2023 19:54, Philip Kaludercic wrote:
>> Steven Allen <steven <at> stebalien.com> writes:
>>
>>> * 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.
>>> ---
>>>  lisp/use-package/use-package-core.el | 3 ++-
>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el
>>> index 0d99e270a3f..e0e16134ed3 100644
>>> --- a/lisp/use-package/use-package-core.el
>>> +++ b/lisp/use-package/use-package-core.el
>>> @@ -1619,7 +1619,8 @@ defvar use-package--form)
>>>      ;; 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.
>>
>> CC'ing Tony, since he did most of the work here.  Do you have any
>> comments on this change?
>
> Looks fine to me; @Steven thanks for catching this! Seems like I wasn't
> careful enough when testing with a byte compiled file.

OK, I'll apply it in that case.

> I'm not super familiar with the testing infrastructure here, but I
> wonder whether there is an easy way to write a quick regression test for
> this?

I'm not a professional software engineer, so I don't know what this
means :/




This bug report was last modified 2 years and 50 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.