all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: 18897@debbugs.gnu.org
Subject: bug#18897: [PATCH] using advice-add
Date: Thu, 30 Oct 2014 00:04:10 -0400	[thread overview]
Message-ID: <jwvppda2osr.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <87a94effwp.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Wed, 29 Oct 2014 19:30:14 -0700")

> Here's a patch that replaces the defalias with an advice-add.

Looks good, please install.  See comments below.

> * lisp/emacs-lisp/eieio.el (eieio-edebug-prin1-to-string): Modify
>   function for use as advice.

Commit messages describe modifications, so "Modify" is
a redundant verb.  I'd say "Adjust for use as advice".

>   (edebug-setup-hook): Add `eieio-edebug-prin1-to-string' as advice on
>   `edebug-prin1-to-string'.

I'd just say "Advise edebug-prin1-to-string".

> +	    (advice-add #'edebug-prin1-to-string
> +			:around #'eieio-edebug-prin1-to-string)))
 
This will work, but is conceptually wrong.  It should be:

	    (advice-add 'edebug-prin1-to-string
			:around #'eieio-edebug-prin1-to-string)))

The thing that is modified by `advice-add' is the `symbol-function'
field of the `edebug-prin1-to-string' symbol, so the first argument of
advice-add should be a symbol, not a function.


        Stefan





  reply	other threads:[~2014-10-30  4:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29 23:30 bug#18897: 25.0.50; Use object-print for representing EIEIO objects during edebug Eric Abrahamsen
2014-10-30  2:29 ` bug#18897: [PATCH] using advice-add Eric Abrahamsen
2014-10-30  2:30 ` Eric Abrahamsen
2014-10-30  4:04   ` Stefan Monnier [this message]
2014-11-01 17:28 ` bug#18897: waiting Eric Abrahamsen
2014-11-01 17:43   ` Eli Zaretskii
2014-11-01 18:51     ` Eric Abrahamsen
2014-11-01 19:48       ` Eli Zaretskii
2014-11-01 21:47         ` Eric Abrahamsen
2014-11-02  3:34           ` Eli Zaretskii
2014-11-02  4:13             ` Eric Abrahamsen
2014-11-02 15:27               ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvppda2osr.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=18897@debbugs.gnu.org \
    --cc=eric@ericabrahamsen.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.