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 18:47:04 -0500 Message-ID: References: <52D368DE.1080303@dancol.org> <52D5CF82.4030405@dancol.org> <871u09kgap.fsf@zigzag.favinet> <52D6120D.3060808@dancol.org> <52D6DD24.7030506@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 1389829642 6933 80.91.229.3 (15 Jan 2014 23:47:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jan 2014 23:47:22 +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 Thu Jan 16 00:47:28 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 1W3aBC-0003Gs-Jm for ged-emacs-devel@m.gmane.org; Thu, 16 Jan 2014 00:47:26 +0100 Original-Received: from localhost ([::1]:57729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3aBC-0001ul-6z for ged-emacs-devel@m.gmane.org; Wed, 15 Jan 2014 18:47:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3aB1-0001uV-8C for emacs-devel@gnu.org; Wed, 15 Jan 2014 18:47:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3aAr-0007c6-9X for emacs-devel@gnu.org; Wed, 15 Jan 2014 18:47:15 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:43857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3aAr-0007c0-5Z; Wed, 15 Jan 2014 18:47:05 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFMCoyj/2dsb2JhbABEhke4Rxdzgh8BBSMzIxALDgwCGA4CAhQYDSSIJK5fkk6BI45UgRMDiGGcGYFegxU X-IPAS-Result: Av8EABK/CFFMCoyj/2dsb2JhbABEhke4Rxdzgh8BBSMzIxALDgwCGA4CAhQYDSSIJK5fkk6BI45UgRMDiGGcGYFegxU X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="45062411" 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 18:47:04 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 62FEB6029E; Wed, 15 Jan 2014 18:47:04 -0500 (EST) In-Reply-To: <52D6DD24.7030506@dancol.org> (Daniel Colascione's message of "Wed, 15 Jan 2014 11:10:28 -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:168506 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 DEFAUL= T-FILENAME args to >>>> =E2=80=98read-file-name=E2=80=99 if the current buffer is Emacs Lisp (= ish). 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. > 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. Stefan