From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Why the odd interactive form in byte-compile-file? Date: Wed, 15 Jan 2014 15:49:54 -0800 Message-ID: <52D71EA2.1030802@dancol.org> 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; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1389829820 8915 80.91.229.3 (15 Jan 2014 23:50:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jan 2014 23:50:20 +0000 (UTC) Cc: Thien-Thi Nguyen , Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 16 00:50: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 1W3aE7-0000iW-E6 for ged-emacs-devel@m.gmane.org; Thu, 16 Jan 2014 00:50:27 +0100 Original-Received: from localhost ([::1]:57751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3aE7-0003JA-3E for ged-emacs-devel@m.gmane.org; Wed, 15 Jan 2014 18:50:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3aDx-0003CH-C2 for emacs-devel@gnu.org; Wed, 15 Jan 2014 18:50:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3aDr-000092-1H for emacs-devel@gnu.org; Wed, 15 Jan 2014 18:50:17 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:35291) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3aDk-0008Rj-6A; Wed, 15 Jan 2014 18:50:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=0sLtJM2CdK7GfMdUAQkXTg/+LZCti4Ii1DiGU/QqhYI=; b=E/gqhwL7e7p3eehLKoEtmGmLiK718gqCRNIFXf0hUGehmPDp+/+/DqxrvJvbWrM9u0PV4us9MjpovpkVtoo4rWq0UZIAoSvPdyO9FQxVttQly67sDlrP49cgiK9tDGshJ4sRQWD61xI5+otuOkR05WM03PUy8s/E5QpjHqvU9dSXp/8nJjzfSqVPEliJ9MQN3z9OE7LHBFP4oAaIb1BDSdBmJTPR0yaJtl5BVr1gG9GaC0bBHdIcvunDZoR48hoXrxynBhDAWObnWzB1heaELS5T1imO6UBhSew7JPIDPzNffYuqTCMIwyvEtufFEdvakF7L1Y2XPTkdQilM0D7zEQ==; Original-Received: from 66-192-186-66.static.twtelecom.net ([66.192.186.66] helo=[172.16.82.151]) by dancol.org with esmtpsa (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1W3aDj-0006hs-A7; Wed, 15 Jan 2014 15:50:03 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 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:168507 Archived-At: 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.