From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: interactive-p and called-interactively-p Date: Fri, 04 Sep 2009 10:21:16 +0900 Message-ID: <87fxb3o67n.fsf@uwakimon.sk.tsukuba.ac.jp> References: <8AD328622F5645B282D1E72CB4582EF3@us.oracle.com> <873a77v31k.fsf@stupidchicken.com> <87iqg0ktic.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 1252026821 16868 80.91.229.12 (4 Sep 2009 01:13:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Sep 2009 01:13:41 +0000 (UTC) Cc: cyd@stupidchicken.com, rms@gnu.org, drew.adams@oracle.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 04 03:13:33 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 1MjNMq-0003D8-Rv for ged-emacs-devel@m.gmane.org; Fri, 04 Sep 2009 03:13:33 +0200 Original-Received: from localhost ([127.0.0.1]:39006 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjNMp-0007WQ-Jw for ged-emacs-devel@m.gmane.org; Thu, 03 Sep 2009 21:13:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MjNMj-0007WB-5W for emacs-devel@gnu.org; Thu, 03 Sep 2009 21:13:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MjNMd-0007VX-Pt for emacs-devel@gnu.org; Thu, 03 Sep 2009 21:13:23 -0400 Original-Received: from [199.232.76.173] (port=38172 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjNMd-0007VE-HQ for emacs-devel@gnu.org; Thu, 03 Sep 2009 21:13:19 -0400 Original-Received: from mtps02.sk.tsukuba.ac.jp ([130.158.97.224]:42769) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MjNMb-0002KI-4l; Thu, 03 Sep 2009 21:13:17 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mtps02.sk.tsukuba.ac.jp (Postfix) with ESMTP id B93AF821B; Fri, 4 Sep 2009 10:13:14 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id A94BF1A260E; Fri, 4 Sep 2009 10:21:16 +0900 (JST) In-Reply-To: X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta29) "garbanzo" 891381effa11+ XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:115018 Archived-At: Stefan Monnier writes: > 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 points out, "called-interactively-p" means "called by call-interactively". If so, adding a mandatory argument means "but not really...". I guess you could name the argument something like "filter-out" and have values like "noninteractive" or "called-from-kbd-macro" for it, but that seems awkward to me. > - mark interactive-p and called-interactively-p as obsolete. > - create a new function `invoked-interactively-p' with a mandatory argument. -1. That is a poor alternative in so many ways. > This said, AFAIK called-interactively-p is not used in any Elisp package > other the ones bundled with Emacs, It's not used in any package in the XEmacs packages tree. I believe it may be used in AUCTeX because of this line from a ChangeLog: auctex-11_84-import/ChangeLog: (TeX-doc): Use `interactive-p' instead of `called-interactively-p' but maybe upstream changed that for XEmacs compatibility. Some packages may be years out of date, but most have been synched within the last couple of years so could have used called-interactively-p.