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.