unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Frank Fischer <frank-fischer@shadow-soft.de>
To: help-gnu-emacs@gnu.org
Subject: Re: defadvice and called-interactively-p
Date: Fri, 8 Jun 2012 06:45:29 +0000 (UTC)	[thread overview]
Message-ID: <jqs729$13n$1@dough.gmane.org> (raw)
In-Reply-To: CAAeL0SQ0yr6J-mhrEqqTpLhzC1fPL+HorEgRJ3MfMt4ZLaJzNQ@mail.gmail.com

On 2012-06-08, Juanma Barranquero <lekktu@gmail.com> wrote:
> 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))

Thanks a lot, this is exactly what I'm looking for. No idea why I
didn't find `ad-get-orig-definition' on my own :)

Frank




  reply	other threads:[~2012-06-08  6:45 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
2012-06-08  6:45           ` Frank Fischer [this message]
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='jqs729$13n$1@dough.gmane.org' \
    --to=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).