unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Can ad-do-it be used in a function called from the defadvice code?
@ 2009-07-01 15:59 Lennart Borgman
  2009-07-01 16:02 ` Davis Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Lennart Borgman @ 2009-07-01 15:59 UTC (permalink / raw)
  To: Emacs-Devel devel

See subject line.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can ad-do-it be used in a function called from the defadvice  code?
  2009-07-01 15:59 Can ad-do-it be used in a function called from the defadvice code? Lennart Borgman
@ 2009-07-01 16:02 ` Davis Herring
  2009-07-01 16:09   ` Lennart Borgman
  0 siblings, 1 reply; 5+ messages in thread
From: Davis Herring @ 2009-07-01 16:02 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: Emacs-Devel devel

Of course not.  It's not a macro, since you don't call it like a function.
 It can't be a variable, because that couldn't trigger evaluation of the
advised function.  So it must be something magical that defadvice itself
looks for.  It can't see into the functions you're calling -- not without
a truly ridiculous amount of instrumentation and overhead -- so it can't
make ad-do-it magic anywhere else.

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can ad-do-it be used in a function called from the defadvice  code?
  2009-07-01 16:02 ` Davis Herring
@ 2009-07-01 16:09   ` Lennart Borgman
  2009-07-01 16:48     ` Stephen J. Turnbull
  0 siblings, 1 reply; 5+ messages in thread
From: Lennart Borgman @ 2009-07-01 16:09 UTC (permalink / raw)
  To: herring; +Cc: Emacs-Devel devel

On Wed, Jul 1, 2009 at 6:02 PM, Davis Herring<herring@lanl.gov> wrote:
> Of course not.  It's not a macro, since you don't call it like a function.
>  It can't be a variable, because that couldn't trigger evaluation of the
> advised function.  So it must be something magical that defadvice itself
> looks for.  It can't see into the functions you're calling -- not without
> a truly ridiculous amount of instrumentation and overhead -- so it can't
> make ad-do-it magic anywhere else.

Thanks Davis, but maybe you are right that it is hard to implement,
but on the other hand can't ad-do-it be left as a placeholder where
the correct function is called when needed. It does not seem to be
very much overhead to me since the let-binding structure is already
there and probably can be used with some mangling.

But anyway I beleive you are right about how it is implemented now (so
I wll copy some code instead...)




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can ad-do-it be used in a function called from the defadvice  code?
  2009-07-01 16:09   ` Lennart Borgman
@ 2009-07-01 16:48     ` Stephen J. Turnbull
  2009-07-01 17:42       ` Lennart Borgman
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen J. Turnbull @ 2009-07-01 16:48 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: Emacs-Devel devel

Lennart Borgman writes:

 > Thanks Davis, but maybe you are right that it is hard to implement,
 > but on the other hand can't ad-do-it be left as a placeholder where
 > the correct function is called when needed. It does not seem to be
 > very much overhead to me since the let-binding structure is already
 > there and probably can be used with some mangling.

And what do you do if there are multiple pieces of advice active?
Which original function does is the "correct function" that this
particular 'ad-do-it refers to?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can ad-do-it be used in a function called from the defadvice  code?
  2009-07-01 16:48     ` Stephen J. Turnbull
@ 2009-07-01 17:42       ` Lennart Borgman
  0 siblings, 0 replies; 5+ messages in thread
From: Lennart Borgman @ 2009-07-01 17:42 UTC (permalink / raw)
  To: Stephen J. Turnbull; +Cc: Emacs-Devel devel

On Wed, Jul 1, 2009 at 6:48 PM, Stephen J. Turnbull<stephen@xemacs.org> wrote:
> Lennart Borgman writes:
>
>  > Thanks Davis, but maybe you are right that it is hard to implement,
>  > but on the other hand can't ad-do-it be left as a placeholder where
>  > the correct function is called when needed. It does not seem to be
>  > very much overhead to me since the let-binding structure is already
>  > there and probably can be used with some mangling.
>
> And what do you do if there are multiple pieces of advice active?
> Which original function does is the "correct function" that this
> particular 'ad-do-it refers to?

The innermost I guess. But maybe that could lead to ambiguities too? I
am not sure.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-07-01 17:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-01 15:59 Can ad-do-it be used in a function called from the defadvice code? Lennart Borgman
2009-07-01 16:02 ` Davis Herring
2009-07-01 16:09   ` Lennart Borgman
2009-07-01 16:48     ` Stephen J. Turnbull
2009-07-01 17:42       ` Lennart Borgman

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).