[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: defadvice and called-interactively-p
From: |
Juanma Barranquero |
Subject: |
Re: defadvice and called-interactively-p |
Date: |
Fri, 8 Jun 2012 02:03:41 +0200 |
On Wed, Jun 6, 2012 at 10:11 AM, Frank Fischer
<frank-fischer@shadow-soft.de> wrote:
> But the problem is that I cannot change/redefine the command that uses
> `called-interactively-p' (that's the whole point of using an advice at
> all), so changing this function is not an option.
As an horrible kludge, if you really need a way to make it work and
don't mind the ugliness:
(defadvice myfunc (around around-myfunc activate)
(if (called-interactively-p 'any)
(call-interactively (ad-get-orig-definition 'myfunc))
ad-do-it))
Juanma