|
From: | Daniel Colascione |
Subject: | Re: Why the odd interactive form in byte-compile-file? |
Date: | Wed, 15 Jan 2014 11:10:28 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
On 01/15/2014 06:46 AM, 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.
[Prev in Thread] | Current Thread | [Next in Thread] |