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: Tue, 14 Jan 2014 16:00:02 -0800 Message-ID: <52D5CF82.4030405@dancol.org> References: <52D368DE.1080303@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1389744009 1431 80.91.229.3 (15 Jan 2014 00:00:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jan 2014 00:00:09 +0000 (UTC) To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 15 01:00:21 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 1W3Du7-0002A5-Os for ged-emacs-devel@m.gmane.org; Wed, 15 Jan 2014 01:00:19 +0100 Original-Received: from localhost ([::1]:51287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3Du7-0005pY-GU for ged-emacs-devel@m.gmane.org; Tue, 14 Jan 2014 19:00:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3Du3-0005pS-53 for emacs-devel@gnu.org; Tue, 14 Jan 2014 19:00:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3Dty-0000nA-RD for emacs-devel@gnu.org; Tue, 14 Jan 2014 19:00:15 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:58494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3Dty-0000n4-Dp for emacs-devel@gnu.org; Tue, 14 Jan 2014 19:00:10 -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:To:MIME-Version:From:Date:Message-ID; bh=ryeE4xcVSg6V4QJbrLJnictM0OrooAXelxsRZxCXflc=; b=JUMW6GWBYZQN+D7pDH8mI3XPwesetChAk8LiP3YxlfPF3VPxmFuqt7nLLUtupxt6wvlRdCI8gYazswz17chOBk1Vv2X3RFzrxPkvaGgHpV3h9ZZxMtk7oCOSoP0LP4wyglDDA2BC3/lvJKES/nPBoJj4DZkCS9vLeiTeezsPRGHTqGJq2PNMEAObstyd+C+R6b0H1eZhJiJuvdn0Urez9P1/k5p9JssWMw/AvQzvfbzX7cRGQ0Jbw+QzOyZD2NvsciMF9JqpgnAcQcCzUsQ+zy0xWuc46pzmTLnAOuFiwyGslLJV3AzgkFSVP6D7QGyBHRh+Fhf2kJzGBn/GuQc0cA==; Original-Received: from [2620:0:1cfe:99::4] by dancol.org with esmtpsa (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1W3Dtx-0003BQ-AD for emacs-devel@gnu.org; Tue, 14 Jan 2014 16:00:09 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <52D368DE.1080303@dancol.org> 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:168407 Archived-At: On 01/12/2014 08:17 PM, Daniel Colascione wrote: > byte-compile-file begins with this interactive spec: > > (interactive > (let ((file buffer-file-name) > (file-name nil) > (file-dir nil)) > (and file > (derived-mode-p 'emacs-lisp-mode) > (setq file-name (file-name-nondirectory file) > file-dir (file-name-directory file))) > (list (read-file-name (if current-prefix-arg > "Byte compile and load file: " > "Byte compile file: ")) > current-prefix-arg))) > > Why do we go to the trouble of splitting the file name when we're in an > emacs-lisp-mode buffer? If I'm editing /foo/bar/qux.el and type M-x > byte-compile-file RET, this code has the effect of compiling qux.el and > putting "qux.el" in file-name-history, not "/foo/bar/qux.el". Now, if > default-history is something else and I use C-x C-f C-r qux, I'll end up > on a bare "qux.el" instead of something I can actually use in another > context. > > 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)) Ping? I'd like to treat this issue as a bugfix and change the interactive form to my proposal for 24.4.