From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Why the odd interactive form in byte-compile-file? Date: Wed, 15 Jan 2014 09:46:50 -0500 Message-ID: References: <52D368DE.1080303@dancol.org> <52D5CF82.4030405@dancol.org> <871u09kgap.fsf@zigzag.favinet> <52D6120D.3060808@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1389797223 26869 80.91.229.3 (15 Jan 2014 14:47:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jan 2014 14:47:03 +0000 (UTC) Cc: Thien-Thi Nguyen , Emacs developers To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 15 15:47:09 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W3RkL-0002O1-1f for ged-emacs-devel@m.gmane.org; Wed, 15 Jan 2014 15:47:09 +0100 Original-Received: from localhost ([::1]:55297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3RkK-00088L-Oj for ged-emacs-devel@m.gmane.org; Wed, 15 Jan 2014 09:47:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3RkA-00087A-Tk for emacs-devel@gnu.org; Wed, 15 Jan 2014 09:47:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3Rk3-0002hK-Cp for emacs-devel@gnu.org; Wed, 15 Jan 2014 09:46:58 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:10682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3Rk3-0002h9-8e; Wed, 15 Jan 2014 09:46:51 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAFABK/CFFMCoyj/2dsb2JhbABEhke4Rxdzgh4BAQQBIzMjBQsLDgwCGA4CAhQYDSSIHgauX5JOgSOOVIETA4hhnBmBXoMV X-IPAS-Result: AgAFABK/CFFMCoyj/2dsb2JhbABEhke4Rxdzgh4BAQQBIzMjBQsLDgwCGA4CAhQYDSSIHgauX5JOgSOOVIETA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="45008989" Original-Received: from 76-10-140-163.dsl.teksavvy.com (HELO pastel.home) ([76.10.140.163]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 15 Jan 2014 09:46:50 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 6BDB16048B; Wed, 15 Jan 2014 09:46:50 -0500 (EST) In-Reply-To: <52D6120D.3060808@dancol.org> (Daniel Colascione's message of "Tue, 14 Jan 2014 20:43:57 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:168460 Archived-At: >> > 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 =E2=80=98interactive=E2=80=99 form supplies DIR and DEFAULT-= FILENAME args to >> =E2=80=98read-file-name=E2=80=99 if the current buffer is Emacs Lisp (is= h). Those are >> available to the user via =E2=80=98M-n=E2=80=99. > Why is that useful? Because you can compile the current buffer's file by just hitting RET. > The current interactive form results in filenames without paths being left > in file-name-history when accepting the default filename with RET. Yes, that's a bug. We shouldn't pass "file-name" to read-file-name but buffer-file-name instead. Stefan