* Replaced obsolete interactive-p function
@ 2011-06-29 16:26 Bastien
2011-06-29 22:29 ` Michael Markert
0 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2011-06-29 16:26 UTC (permalink / raw)
To: emacs-orgmode
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.
Thanks!
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Replaced obsolete interactive-p function
2011-06-29 16:26 Replaced obsolete interactive-p function Bastien
@ 2011-06-29 22:29 ` Michael Markert
2011-06-29 22:50 ` Carsten Dominik
2011-06-30 9:16 ` Bastien
0 siblings, 2 replies; 8+ messages in thread
From: Michael Markert @ 2011-06-29 22:29 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
[-- 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 --]
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: Replaced obsolete interactive-p function
2011-06-29 22:29 ` Michael Markert
@ 2011-06-29 22:50 ` Carsten Dominik
2011-06-29 23:27 ` Eric Schulte
2011-06-30 9:16 ` Bastien
1 sibling, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2011-06-29 22:50 UTC (permalink / raw)
To: Michael Markert; +Cc: Bastien, emacs-orgmode
I suggest to talk to Eric Schulte before applying this patch....
- Carsten
On 30.6.2011, at 00:29, Michael Markert wrote:
> 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
>
> <0001-org-macs-Determine-on-macro-expand-which-interactive.patch>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Replaced obsolete interactive-p function
2011-06-29 22:50 ` Carsten Dominik
@ 2011-06-29 23:27 ` Eric Schulte
2011-06-30 8:36 ` Bastien
0 siblings, 1 reply; 8+ messages in thread
From: Eric Schulte @ 2011-06-29 23:27 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Bastien, emacs-orgmode, Michael Markert
Michael's patch looks great to me, I can confirm that it does stifle the
warnings on Emacs24, and everything compiles and works as expected -- at
least as far as the Org-mode test suite is able to differentiate.
In addition to applying this patch I've also added another patch which
supplies the optional KIND argument to every invocation of
org-called-interactively-p.
Cheers -- Eric
Carsten Dominik <carsten.dominik@gmail.com> writes:
> I suggest to talk to Eric Schulte before applying this patch....
>
> - Carsten
>
> On 30.6.2011, at 00:29, Michael Markert wrote:
>
>> 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
>>
>> <0001-org-macs-Determine-on-macro-expand-which-interactive.patch>
>
>
--
Eric Schulte
http://cs.unm.edu/~eschulte/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Replaced obsolete interactive-p function
2011-06-29 23:27 ` Eric Schulte
@ 2011-06-30 8:36 ` Bastien
2011-06-30 18:12 ` Eric Schulte
0 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2011-06-30 8:36 UTC (permalink / raw)
To: Eric Schulte; +Cc: emacs-orgmode, Michael Markert, Carsten Dominik
Hi Eric and Michael,
Eric Schulte <schulte.eric@gmail.com> writes:
> Michael's patch looks great to me, I can confirm that it does stifle the
> warnings on Emacs24, and everything compiles and works as expected -- at
> least as far as the Org-mode test suite is able to differentiate.
Thanks to Michael for the patch, it does indeed fix the warnings.
> In addition to applying this patch I've also added another patch which
> supplies the optional KIND argument to every invocation of
> org-called-interactively-p.
I thought the absence of argument was taken care by the
org-called-interactively-p macro -- see the (with-no-warning ...)
sexp in it, and the comment.
Eric, any reason for explicitely adding an argument?
I understand it's better for readability and it will ease the future
replacement of org-called-interactively-p by called-interactively-p,
but I was just curious to know if there was some other reasons.
Thanks!
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Replaced obsolete interactive-p function
2011-06-30 8:36 ` Bastien
@ 2011-06-30 18:12 ` Eric Schulte
2011-07-01 8:59 ` Bastien
0 siblings, 1 reply; 8+ messages in thread
From: Eric Schulte @ 2011-06-30 18:12 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode, Michael Markert, Carsten Dominik
Bastien <bzg@altern.org> writes:
> Hi Eric and Michael,
>
> Eric Schulte <schulte.eric@gmail.com> writes:
>
>> Michael's patch looks great to me, I can confirm that it does stifle the
>> warnings on Emacs24, and everything compiles and works as expected -- at
>> least as far as the Org-mode test suite is able to differentiate.
>
> Thanks to Michael for the patch, it does indeed fix the warnings.
>
>> In addition to applying this patch I've also added another patch which
>> supplies the optional KIND argument to every invocation of
>> org-called-interactively-p.
>
> I thought the absence of argument was taken care by the
> org-called-interactively-p macro -- see the (with-no-warning ...)
> sexp in it, and the comment.
>
> Eric, any reason for explicitely adding an argument?
>
> I understand it's better for readability and it will ease the future
> replacement of org-called-interactively-p by called-interactively-p,
> but I was just curious to know if there was some other reasons.
>
This extra argument supplies more information to the macro (e.g., an
idea of /how/ interactive is considered /interactive/) through taking on
the value of 'any or 'interactive. This information is thrown out in
older versions of Emacs but is passed on to the called-interactively-p
function in Emacs24 and should influence its behavior.
Cheers -- Eric
>
> Thanks!
--
Eric Schulte
http://cs.unm.edu/~eschulte/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Replaced obsolete interactive-p function
2011-06-30 18:12 ` Eric Schulte
@ 2011-07-01 8:59 ` Bastien
0 siblings, 0 replies; 8+ messages in thread
From: Bastien @ 2011-07-01 8:59 UTC (permalink / raw)
To: Eric Schulte; +Cc: emacs-orgmode, Michael Markert, Carsten Dominik
Hi Eric,
Eric Schulte <schulte.eric@gmail.com> writes:
> This extra argument supplies more information to the macro (e.g., an
> idea of /how/ interactive is considered /interactive/) through taking on
> the value of 'any or 'interactive. This information is thrown out in
> older versions of Emacs but is passed on to the called-interactively-p
> function in Emacs24 and should influence its behavior.
Thanks for the explanations.
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Replaced obsolete interactive-p function
2011-06-29 22:29 ` Michael Markert
2011-06-29 22:50 ` Carsten Dominik
@ 2011-06-30 9:16 ` Bastien
1 sibling, 0 replies; 8+ messages in thread
From: Bastien @ 2011-06-30 9:16 UTC (permalink / raw)
To: Michael Markert; +Cc: emacs-orgmode
Michael Markert <markert.michael@googlemail.com> writes:
> 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).
Thanks for this patch Michael!
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-07-01 8:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-29 16:26 Replaced obsolete interactive-p function Bastien
2011-06-29 22:29 ` Michael Markert
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
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).