From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Markert Subject: Re: Replaced obsolete interactive-p function Date: Thu, 30 Jun 2011 00:29:23 +0200 Message-ID: <877h845l18.wl%markert.michael@googlemail.com> References: <87zkl01u4y.fsf@gnu.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Thu_Jun_30_00:29:22_2011-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qc3GE-0000es-A0 for emacs-orgmode@gnu.org; Wed, 29 Jun 2011 18:29:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qc3GC-0002u9-8J for emacs-orgmode@gnu.org; Wed, 29 Jun 2011 18:29:30 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:49447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qc3GB-0002u3-PY for emacs-orgmode@gnu.org; Wed, 29 Jun 2011 18:29:28 -0400 Received: by bwd14 with SMTP id 14so1817779bwd.0 for ; Wed, 29 Jun 2011 15:29:26 -0700 (PDT) In-Reply-To: <87zkl01u4y.fsf@gnu.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org --pgp-sign-Multipart_Thu_Jun_30_00:29:22_2011-1 Content-Type: multipart/mixed; boundary="Multipart_Thu_Jun_30_00:29:22_2011-1" --Multipart_Thu_Jun_30_00:29:22_2011-1 Content-Type: text/plain; charset=US-ASCII On 29 Jun 2011, Bastien wrote: > Dear all, > > interactive-p is obsolete since Emacs 23.2 and should be replaced by > called-interactively-p. > > The org-called-interactively-p macro takes care of using either > interactive-p or called-interactively-p. > > I've just updated the latest git and Org uses > org-called-interactively-p wherever it makes sense. > > Please report any weird compilation warnings and/or problems. I still see a lot warnings complaining about `interactive-p'. I figured that it happens because the byte-compiler still sees the `interactive-p's Appended is a patch to the macro that checks on expand which interactive predicate we need. I don't see those warnings anymore and a quick check showed that it behaves as the complete version (at least on emacs24). Michael --Multipart_Thu_Jun_30_00:29:22_2011-1 Content-Type: text/plain; type=patch; charset=US-ASCII Content-Disposition: attachment; filename="0001-org-macs-Determine-on-macro-expand-which-interactive.patch" Content-Transfer-Encoding: 7bit >From e6c8ce384d7e848367a900681f10a13fffea882b Mon Sep 17 00:00:00 2001 From: Michael Markert Date: Thu, 30 Jun 2011 00:25:09 +0200 Subject: [PATCH] org-macs: Determine on macro expand which interactive predicate we need. Signed-off-by: Michael Markert --- lisp/org-macs.el | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 27e1d88..731642d 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -48,13 +48,13 @@ (declare-function org-string-match-p "org-compat" (&rest args)) (defmacro org-called-interactively-p (&optional kind) - `(if (featurep 'xemacs) - (interactive-p) + (if (featurep 'xemacs) + `(interactive-p) (if (or (> emacs-major-version 23) (and (>= emacs-major-version 23) (>= emacs-minor-version 2))) - (with-no-warnings (called-interactively-p ,kind)) ;; defined with no argument in <=23.1 - (interactive-p)))) + `(with-no-warnings (called-interactively-p ,kind)) ;; defined with no argument in <=23.1 + `(interactive-p)))) (if (and (not (fboundp 'with-silent-modifications)) (or (< emacs-major-version 23) -- 1.7.5.4 --Multipart_Thu_Jun_30_00:29:22_2011-1-- --pgp-sign-Multipart_Thu_Jun_30_00:29:22_2011-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCAAGBQJOC6dCAAoJEHHMVUK0UjKVZSkP/25Tf4tB62rF3/P/eUPT9DBy eLXJOTm8E7opi8AO4/HuYoLnDsq1kA+tXcw8X0Bmlkcv2Qy6MqSWttUoUhQIZmZd 4jr/zu2YaIbZwgZsoMKNvroEWmo5QN7EkNyGMUVIbaDdsUi5N51djXM5fABDnyxr q0dYyqO2+NkGFFDUACTxH4MW+VBr0fzvY01Yreg7215B1aAPum8i4G9i7ipA2pro 5F3u/5qv1LWB/DJqM5BeoUwTyBanlyadKTrc7PozlAR0TdvX5DyKz4nLwzzLXk1f /r1Mgyd8o+HJulGGJ8ZyJ5fqe2DBkUCy/nVJXALUHNjx738j7qgRl6IBNAyTVbPi rQKCxUxeakNf/jAE9fAvZ17o7UkQFRya9+/+Rd2cV+AYEdto7TxpLvqAwywDvK/+ umfPAjMGxY8rq+W5yZ/Xxtpzb5v6WOZ7rSCzlBMhL5G4NFVKt+6Wg3AYCJI+nfei MDL3L1G91EfNefDKASAUjqTnJP1rdHpSYcSKezPA+X0KxIZLnzUMRqQaIVwIMi5U 1xbSZ3aG4ukl5IM9z/bxzFLdx+nqzFI+zoWyTqpGAqwsUn9WQfe1QBhfD6o5Sf3M 4Eq47/wHDyxyysYf2Ehs9SPt5AfiCQKHtkf36SxmM9GCl3p5/TyhT8RNPzwvzL4x SYFTqY8xUz2+6xqjLMfA =SAIC -----END PGP SIGNATURE----- --pgp-sign-Multipart_Thu_Jun_30_00:29:22_2011-1--