From: Juanma Barranquero <lekktu@gmail.com>
To: Frank Fischer <frank-fischer@shadow-soft.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: defadvice and called-interactively-p
Date: Fri, 8 Jun 2012 02:03:41 +0200 [thread overview]
Message-ID: <CAAeL0SQ0yr6J-mhrEqqTpLhzC1fPL+HorEgRJ3MfMt4ZLaJzNQ@mail.gmail.com> (raw)
In-Reply-To: <jqn3bq$jhn$1@dough.gmane.org>
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
next prev parent reply other threads:[~2012-06-08 0:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-06 7:03 defadvice and called-interactively-p Frank Fischer
2012-06-06 7:26 ` Eric Abrahamsen
2012-06-06 7:35 ` Frank Fischer
2012-06-06 7:55 ` Eric Abrahamsen
2012-06-06 8:11 ` Frank Fischer
2012-06-08 0:03 ` Juanma Barranquero [this message]
2012-06-08 6:45 ` Frank Fischer
2012-06-08 7:02 ` Juanma Barranquero
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.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAeL0SQ0yr6J-mhrEqqTpLhzC1fPL+HorEgRJ3MfMt4ZLaJzNQ@mail.gmail.com \
--to=lekktu@gmail.com \
--cc=frank-fischer@shadow-soft.de \
--cc=help-gnu-emacs@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.
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).