emacs-devel
[Top][All Lists]
Advanced

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

Re: Why the odd interactive form in byte-compile-file?


From: Daniel Colascione
Subject: Re: Why the odd interactive form in byte-compile-file?
Date: Wed, 15 Jan 2014 15:49:54 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0



On 01/15/2014 03:47 PM, Stefan Monnier wrote:
Is there some deeper reason we're not using code that looks like this?
(interactive
(list (read-file-name (if current-prefix-arg
"Byte compile and load file:"
"Byte compile file: "))
current-prefix-arg))
The current ‘interactive’ form supplies DIR and DEFAULT-FILENAME args to
‘read-file-name’ if the current buffer is Emacs Lisp (ish).  Those are
available to the user via ‘M-n’.
Why is that useful?
Because you can compile the current buffer's file by just hitting RET.
Sure, but that also works without the file-dir and file-name parameters
being passed at all.

I suggest to replace file-name with buffer-file-name for now (since it
fixes a bug), and to install your simpler code after we re-open the
trunk for non-bugfix changes.

Thanks. Done.



reply via email to

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