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

>From e6c8ce384d7e848367a900681f10a13fffea882b Mon Sep 17 00:00:00 2001
From: Michael Markert <markert.mich...@googlemail.com>
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 <markert.mich...@googlemail.com>
---
 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

Attachment: pgpcKBTojsYMD.pgp
Description: PGP signature

Reply via email to