From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: [emacs-w3m:11603] Re: interactive-p obsolete Date: Thu, 7 Jul 2011 00:51:52 +0200 Message-ID: References: <4E13FCE4.8080309@easy-emacs.de> <871uy3lrfy.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1309992780 1503 80.91.229.12 (6 Jul 2011 22:53:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 6 Jul 2011 22:53:00 +0000 (UTC) Cc: Bastien , Tim Cross , emacs-devel@gnu.org To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 07 00:52:55 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qeaxi-0004Z0-In for ged-emacs-devel@m.gmane.org; Thu, 07 Jul 2011 00:52:54 +0200 Original-Received: from localhost ([::1]:53023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qeaxh-0003LZ-MH for ged-emacs-devel@m.gmane.org; Wed, 06 Jul 2011 18:52:53 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:43281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeaxP-0003LC-IC for emacs-devel@gnu.org; Wed, 06 Jul 2011 18:52:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QeaxO-00054J-6N for emacs-devel@gnu.org; Wed, 06 Jul 2011 18:52:35 -0400 Original-Received: from mail-pv0-f169.google.com ([74.125.83.169]:51486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeaxN-000542-Lt for emacs-devel@gnu.org; Wed, 06 Jul 2011 18:52:34 -0400 Original-Received: by pvc12 with SMTP id 12so57492pvc.0 for ; Wed, 06 Jul 2011 15:52:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=7bUD9ahHagYHKADcgy95DBUGlzDBXNMerY2FA6Q+57g=; b=B9SXDYfVFCHf0FAXTOx9R4WSVP+yT4L1DusyzyFB+Jbqe/iDUOomB5G3DXBls06wOm YGssg+Z1lVbL+2ceu9WeX2ctvM1vHQpkmDzcVL39p7NSMZ/J61kCGDOfBtmDAbBSGM9k UzjMrzMhVhjDj7jKr5h3YzMafxpGqEo78mQSo= Original-Received: by 10.143.90.14 with SMTP id s14mr58930wfl.138.1309992752098; Wed, 06 Jul 2011 15:52:32 -0700 (PDT) Original-Received: by 10.142.144.4 with HTTP; Wed, 6 Jul 2011 15:51:52 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.83.169 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:141695 Archived-At: On Wed, Jul 6, 2011 at 20:16, Lennart Borgman w= rote: >> (defmacro org-called-interactively-p (&optional kind) >> =C2=A0(if (featurep 'xemacs) >> =C2=A0 =C2=A0 =C2=A0 `(interactive-p) >> =C2=A0 =C2=A0 (if (or (> emacs-major-version 23) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (and (>=3D emacs-major-version= 23) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(>=3D emac= s-minor-version 2))) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 `(with-no-warnings (called-interactively-p ,= kind)) >> =C2=A0 =C2=A0 =C2=A0 `(interactive-p)))) > > Why not add such a macro to Emacs? Hmm... What for? In the Emacs trunk, it trivially resolves to "(with-no-warnings (called-interactively-p kind))", which is a longish way to say just "(called-interactively-p kind)". And externally maintained packages would still need to define it because the whole point is that they are loaded in environments which are *not* the Emacs trunk... So the only benefit for them would be to be able to do (if (fboundp 'compatible-called-interactively-p) (compatible-callled-interactively-p kind) ;; compatibility code here and that's no less trouble that directly defining the compatibility macro in the first place. =C2=A0 =C2=A0 Juanma