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: interactive-p and called-interactively-p Date: Fri, 04 Sep 2009 09:11:14 -0400 Message-ID: References: <8AD328622F5645B282D1E72CB4582EF3@us.oracle.com> <873a77v31k.fsf@stupidchicken.com> <87iqg0ktic.fsf@uwakimon.sk.tsukuba.ac.jp> <87fxb3o67n.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1252069899 32537 80.91.229.12 (4 Sep 2009 13:11:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Sep 2009 13:11:39 +0000 (UTC) Cc: cyd@stupidchicken.com, rms@gnu.org, drew.adams@oracle.com, emacs-devel@gnu.org To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 04 15:11:31 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MjYZd-0001ef-48 for ged-emacs-devel@m.gmane.org; Fri, 04 Sep 2009 15:11:29 +0200 Original-Received: from localhost ([127.0.0.1]:54801 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjYZc-0001cH-CH for ged-emacs-devel@m.gmane.org; Fri, 04 Sep 2009 09:11:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MjYZX-0001cC-5p for emacs-devel@gnu.org; Fri, 04 Sep 2009 09:11:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MjYZR-0001bc-Oq for emacs-devel@gnu.org; Fri, 04 Sep 2009 09:11:21 -0400 Original-Received: from [199.232.76.173] (port=46619 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjYZR-0001bZ-Jd for emacs-devel@gnu.org; Fri, 04 Sep 2009 09:11:17 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:62969 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MjYZP-0005Ez-UP; Fri, 04 Sep 2009 09:11:16 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq8EADuvoEpLd+Vr/2dsb2JhbACBU9dohBsFh3Y X-IronPort-AV: E=Sophos;i="4.44,332,1249272000"; d="scan'208";a="45126951" Original-Received: from 75-119-229-107.dsl.teksavvy.com (HELO pastel.home) ([75.119.229.107]) by ironport2-out.teksavvy.com with ESMTP; 04 Sep 2009 09:10:00 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 52D447F45; Fri, 4 Sep 2009 09:11:14 -0400 (EDT) In-Reply-To: <87fxb3o67n.fsf@uwakimon.sk.tsukuba.ac.jp> (Stephen J. Turnbull's message of "Fri, 04 Sep 2009 10:21:16 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115030 Archived-At: >> So, I'd suggest the following: >> - mark interactive-p as obsolete. >> - add a mandatory argument to called-interactively-p. > I'd slightly prefer to keep interactive-p and give it the mandatory > argument, maybe a list of things to test a la eval-when. As Richard That would break so much existing code, that I don't think it's an option. > points out, "called-interactively-p" means "called by > call-interactively". If so, adding a mandatory argument means "but > not really...". Both `interactive-p' and `called-interactively-p' check whether the caller was invoked via `call-interactively', so I think it's OK to bring them both within called-interactively-p, just with an additional arg saying "and not from a macro or in batch mode". Stefan