[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why does byte-compile-file copy the input file to a different buffer
From: |
Eli Zaretskii |
Subject: |
Re: Why does byte-compile-file copy the input file to a different buffer? |
Date: |
Sun, 17 Dec 2023 18:48:32 +0200 |
> Date: Sun, 17 Dec 2023 16:06:44 +0000
> From: Alan Mackenzie <acm@muc.de>
>
> On executing a byte-compile-file command, rather than working on the
> file's buffer directly, the byte compiler first copies the buffer/file
> into another buffer with a boring name like " *Compiler Input*" or "
> *Compiler Input*-1".
>
> Why does it do this? It makes it difficult, in the reader, to determine
> the identity of the actual source buffer. (Yes, I have reasons for
> wanting to do this.)
>
> Would it not be simpler just to compile directly from the source buffer,
> thus avoiding a needless copying and making it clear what the actual
> source buffer is?
The command uses insert-file-contents to insert the file into the
input buffer, and works on that, so that looks very natural to me.
I'm not sure what is bothering you in that, or why.