[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: called-interactively-p, cedet, and Emacs 23.1 and earlier

From: Bruce Stephens
Subject: Re: called-interactively-p, cedet, and Emacs 23.1 and earlier
Date: Mon, 26 Apr 2010 16:28:02 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> Anyway, that makes it obvious why Stefan used a macro before.
> ;-)
>> Does anyone know of a way to solve this, or do I need to maintain this
>> difference in my code?
> Sorry for not posting more concrete code earlier (it has several other
> bugs, such as not evaluating the arg), but I think the solution is
> pretty much what I suggested, except you need to use
> cedet-called-interactively-p everywhere and have it macro-expand to
> either interactive-p or called-interactively-p with or without args
> depending on what's available.

I find it doesn't work everywhere (in Emacs 23.1, running with the
external CVS version of cedet).  I get errors about
cedet-called-interactively-p being an invalid function.  I'm fairly sure
it's this defadvice code:

(defadvice beginning-of-defun (around senator activate)
  "Move backward to the beginning of a defun.
If semantic tags are available, use them to navigate."
  (if (and senator-minor-mode (cedet-called-interactively-p))
      (senator-beginning-of-defun (ad-get-arg 0))

As far as I can tell this is being byte-compiled with the macro visible.
So is there some magic with defadvice and macros?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]