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 11:10:28 -0800 Message-ID: <52D6DD24.7030506@dancol.org> 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; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1389813055 9123 80.91.229.3 (15 Jan 2014 19:10:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jan 2014 19:10:55 +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 Wed Jan 15 20:11:01 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 1W3Vre-0000sr-5U for ged-emacs-devel@m.gmane.org; Wed, 15 Jan 2014 20:10:58 +0100 Original-Received: from localhost ([::1]:56768 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3Vrd-0005iv-OA for ged-emacs-devel@m.gmane.org; Wed, 15 Jan 2014 14:10:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3VrU-0005iW-Rh for emacs-devel@gnu.org; Wed, 15 Jan 2014 14:10:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3VrO-00068S-On for emacs-devel@gnu.org; Wed, 15 Jan 2014 14:10:48 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:34362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3VrH-00067Y-S7; Wed, 15 Jan 2014 14:10:36 -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=4DxsfajaZTmxtevxu4BxnQ7y6siR71TWNcXjzi0ysUc=; b=W40xHsSqFrNOSwxg+yN2wK+rQAxRzRjnvvdTEPE6VEGuK1NyzjjZwXjY5KUKBNprregEKRQBtnSisJlcXVs+0w68DeCJ2wVe2UfATIKpeoYQpxvw3n2UKJPBAE1/nLl76PExc7J0GIBYR0sG4UjBRYJeO2UJYpfEDeSQDaWrNIyJE2gWbWCb7/+Ilhi8HAqd7po+qPODdUwErwCQ+3WmvLGA2Vku7DlYkAb4UIpZvf/Bk+h9oHVY3LFe6pHNLMZj901VGxUvb3BFJt3AgqKnqFcZTZyxtlmUVcorQ7yhmi69f5LFQqpp4xNW1QoDMPyodfANNeAvqkesUxr5PqSbGQ==; Original-Received: from c-67-161-114-125.hsd1.wa.comcast.net ([67.161.114.125] helo=[192.168.1.50]) by dancol.org with esmtpsa (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1W3VrB-0005oV-RO; Wed, 15 Jan 2014 11:10:29 -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:168489 Archived-At: On 01/15/2014 06:46 AM, 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.