bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38072: when `byte-compile-file' finds out that a file is `no-byte-co


From: Stefan Monnier
Subject: bug#38072: when `byte-compile-file' finds out that a file is `no-byte-compile', it ignores `load' parameter
Date: Sat, 05 Sep 2020 11:26:16 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>     Compile a file of Lisp code named FILENAME into a file of byte code.
>>     The output file’s name is generated by passing FILENAME to the
>>     function ‘byte-compile-dest-file’ (which see).
>>     With prefix arg (noninteractively: 2nd arg), LOAD the file after 
>> compiling.
>>                                                                
>> ^^^^^^^^^^^^^^^
>> 
>> So should we load the file if we did not compile the file?  I'm thinking
>> yes, and I don't see what it could hurt to change it to load the file.
>> If the user uses a prefix arg or the LOAD argument from Lisp, surely
>> that was the intention.
>> 
>> But on the other hand the text above seems deliberate, somehow?  (And
>> AFAICT the behavior has been not to load the file since pretty much
>> forever, possibly since byte-compilation was first added.)
>
> I'm indeed bothered by backward incompatibility of such a change.
> Paul expected the file to be loaded unconditionally, but how do we
> know someone else isn't expecting the opposite in this case?  Also, do
> we want the same behavior in the interactive case?
>
> At the very least, if we decide to install this, the change in
> behavior should be in NEWS.
>
> Stefan, any comments on this?

FWIW, I find the "and load" feature to be a mistake: the function should
return whether or not it successfully compiled the file, but shouldn't
offer to load the result, since the callers can just as easily do
it themselves (and then they can easily control what happens when
compilation did not succeed).
So, I'd suggest we deprecate that "feature" rather than try and decide
which behavior is better.


        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]