GNU bug report logs - #18897
25.0.50; Use object-print for representing EIEIO objects during edebug

Previous Next

Package: emacs;

Reported by: Eric Abrahamsen <eric <at> ericabrahamsen.net>

Date: Wed, 29 Oct 2014 23:26:02 UTC

Severity: minor

Found in version 25.0.50

Done: Eric Abrahamsen <eric <at> ericabrahamsen.net>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 18897 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 18897 <at> debbugs.gnu.org
Subject: Re: bug#18897: [PATCH] using advice-add
Date: Thu, 30 Oct 2014 00:04:10 -0400
> 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




This bug report was last modified 10 years and 281 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.