From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.devel Subject: Emacs 25.0.04: Feature Request: Make called-interactively-p's argument optional Date: Mon, 27 Jun 2016 16:35:18 -0400 Message-ID: Reply-To: rswgnu@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c114d1e21fcf305364877d8 X-Trace: ger.gmane.org 1467059834 6030 80.91.229.3 (27 Jun 2016 20:37:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2016 20:37:14 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 27 22:37:11 2016 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 1bHdHK-0006dI-Ej for ged-emacs-devel@m.gmane.org; Mon, 27 Jun 2016 22:37:10 +0200 Original-Received: from localhost ([::1]:60989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHdHJ-0002Dg-GB for ged-emacs-devel@m.gmane.org; Mon, 27 Jun 2016 16:37:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHdG6-0001rw-Ft for emacs-devel@gnu.org; Mon, 27 Jun 2016 16:35:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHdG2-0005GS-4U for emacs-devel@gnu.org; Mon, 27 Jun 2016 16:35:53 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40704) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHdG2-0005Fw-0m for emacs-devel@gnu.org; Mon, 27 Jun 2016 16:35:50 -0400 Original-Received: from mail-oi0-f45.google.com ([209.85.218.45]:35722) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bHdG0-0006S5-Kq for emacs-devel@gnu.org; Mon, 27 Jun 2016 16:35:48 -0400 Original-Received: by mail-oi0-f45.google.com with SMTP id r2so216875238oih.2 for ; Mon, 27 Jun 2016 13:35:48 -0700 (PDT) X-Gm-Message-State: ALyK8tLiU7+/OanIbiHSIEnBzMq+DBOo7Vbm1KRtXc69sorwMLao7GsJnvtI20hg7+pGEHHV5atwFWr/OhCU4Q== X-Received: by 10.157.2.74 with SMTP id 68mr2112352otb.70.1467059747811; Mon, 27 Jun 2016 13:35:47 -0700 (PDT) Original-Received: by 10.202.212.143 with HTTP; Mon, 27 Jun 2016 13:35:18 -0700 (PDT) X-Gmail-Original-Message-ID: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:204836 Archived-At: --94eb2c114d1e21fcf305364877d8 Content-Type: text/plain; charset=UTF-8 I have some older code with a lot of calls to (interactive-p) for which I am having to substitute (called-interactively-p 'interactive) to get the same behavior with a non-obsoleted call. Visually, this does not read well to me and I imagine others. What do people think of making the argument optional and defaulting it to the behavior of (interactive-p) which I believe equates to the 'interactive argument value? Then we would have: if (called-interactively-p) ...) in a lot of places and that would look much better and be much easier to call properly. When more complex behavior is needed, the argument could be given. Bob --94eb2c114d1e21fcf305364877d8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I have some older code with a lot of calls to (interactive-p) = for which
I am having to substitute (called-interactively-p 'interacti= ve) to get the same behavior with a non-obsoleted call.=C2=A0 Visually, thi= s does not read well to me and I imagine others.=C2=A0 What do people think= of making the argument optional and defaulting it to the behavior of (inte= ractive-p) which I believe equates to the 'interactive argument value?<= /div>

Then we would have: if (called-interactively-p) ...) in a lot of pla= ces and that would look much better and be much easier to call properly.
<= br>
When more complex behavior is needed, the argument could be given.
Bob

--94eb2c114d1e21fcf305364877d8--