From: Michael Markert <markert.michael@googlemail.com>
To: Bastien <bzg@altern.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Replaced obsolete interactive-p function
Date: Thu, 30 Jun 2011 00:29:23 +0200 [thread overview]
Message-ID: <877h845l18.wl%markert.michael@googlemail.com> (raw)
In-Reply-To: <87zkl01u4y.fsf@gnu.org>
[-- Attachment #1.1: Type: text/plain, Size: 797 bytes --]
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
[-- Attachment #1.2: 0001-org-macs-Determine-on-macro-expand-which-interactive.patch --]
[-- Type: text/plain, Size: 1230 bytes --]
From e6c8ce384d7e848367a900681f10a13fffea882b Mon Sep 17 00:00:00 2001
From: Michael Markert <markert.michael@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.michael@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 #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2011-06-29 22:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-29 16:26 Replaced obsolete interactive-p function Bastien
2011-06-29 22:29 ` Michael Markert [this message]
2011-06-29 22:50 ` Carsten Dominik
2011-06-29 23:27 ` Eric Schulte
2011-06-30 8:36 ` Bastien
2011-06-30 18:12 ` Eric Schulte
2011-07-01 8:59 ` Bastien
2011-06-30 9:16 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877h845l18.wl%markert.michael@googlemail.com \
--to=markert.michael@googlemail.com \
--cc=bzg@altern.org \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).