From: Daniel Colascione <dancol@dancol.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Thien-Thi Nguyen <ttn@gnu.org>, Emacs developers <emacs-devel@gnu.org>
Subject: Re: Why the odd interactive form in byte-compile-file?
Date: Wed, 15 Jan 2014 15:49:54 -0800 [thread overview]
Message-ID: <52D71EA2.1030802@dancol.org> (raw)
In-Reply-To: <jwv7ga0vmfa.fsf-monnier+emacs@gnu.org>
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.
prev parent reply other threads:[~2014-01-15 23:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-13 4:17 Why the odd interactive form in byte-compile-file? Daniel Colascione
2014-01-15 0:00 ` Daniel Colascione
2014-01-15 4:41 ` Thien-Thi Nguyen
2014-01-15 4:43 ` Daniel Colascione
2014-01-15 14:46 ` Stefan Monnier
2014-01-15 19:10 ` Daniel Colascione
2014-01-15 23:47 ` Stefan Monnier
2014-01-15 23:49 ` Daniel Colascione [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52D71EA2.1030802@dancol.org \
--to=dancol@dancol.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=ttn@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.