[Top][All Lists]

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

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

From: Stefan Monnier
Subject: Re: Why the odd interactive form in byte-compile-file?
Date: Wed, 15 Jan 2014 18:47:04 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>>>>> 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.


reply via email to

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