unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Oleh Krehel <ohwoeowho@gmail.com>
To: 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 14:55:01 +0100	[thread overview]
Message-ID: <87y4on57t6.fsf@gmail.com> (raw)


`ad-is-adviced' 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).

On the other hand, this code from `advice-remove' will work:

    (advice--p (advice--symbol-function 'foo))

To summarize, functions instrumented by elp aren't recognized as adviced
by `ad-is-advised', even though :around advice: even shows up in the
docstring.

A fix could be to change `ad-is-adviced' to expand to either

    (or (get 'foo 'ad-advice-info)
        (get 'foo 'elp-info))

or

    (advice--p (advice--symbol-function 'foo))






             reply	other threads:[~2015-01-28 13:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28 13:55 Oleh Krehel [this message]
2015-01-28 19:55 ` bug#19711: 25.0.50; (ad-is-adviced sym) is inconsistent with (advice--p (advice--symbol-function sym)) Stefan Monnier
2015-01-28 20:07   ` Oleh Krehel
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=87y4on57t6.fsf@gmail.com \
    --to=ohwoeowho@gmail.com \
    --cc=19711@debbugs.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.
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).