unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Oleh Krehel <ohwoeowho@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 19711@debbugs.gnu.org
Subject: bug#19711: 25.0.50; (ad-is-adviced sym) is inconsistent with (advice--p (advice--symbol-function sym))
Date: Wed, 28 Jan 2015 21:07:36 +0100	[thread overview]
Message-ID: <CAA01p3opGGMD5a_dpq5Ay7KkenQ1PykQt-MEE_fq76jq1PhwNw@mail.gmail.com> (raw)
In-Reply-To: <jwvegqeof6i.fsf-monnier+emacsbugs@gnu.org>

On Wed, Jan 28, 2015 at 8:55 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>> `ad-is-advised' expands to:
>>     (get 'foo 'ad-advice-info)
>> This code will not detect if the function `foo' is being instrumented
>> with `elp-instrument-package' (which is a form of advice).
>
> That's because ad-is-advised tells you "is there a "defadvice" on this
> function" rather than "is there some kind of advice-like thingy on this
> function".
> Since this is used by advice.el internally, changing it might just break
> advice.el.

I'm mainly interested in this application:

    (help-function-arglist
     (if (ad-is-advised fun)
         (ad-get-orig-definition fun)
       fun)
     t)

I can't get the original arguments of FUN if it's adviced
(instrumented also falls here), so I'd like to detect if it is.
If `ad-is-advised` isn't enough, what other (public) function could I use?





  reply	other threads:[~2015-01-28 20:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28 13:55 bug#19711: 25.0.50; (ad-is-adviced sym) is inconsistent with (advice--p (advice--symbol-function sym)) Oleh Krehel
2015-01-28 19:55 ` Stefan Monnier
2015-01-28 20:07   ` Oleh Krehel [this message]
2015-01-28 21:46     ` Stefan Monnier
2021-08-16 13:15       ` Lars Ingebrigtsen
2021-08-16 17:39         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=CAA01p3opGGMD5a_dpq5Ay7KkenQ1PykQt-MEE_fq76jq1PhwNw@mail.gmail.com \
    --to=ohwoeowho@gmail.com \
    --cc=19711@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).