help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proper use of add-function


From: Michael Heerdegen
Subject: Re: proper use of add-function
Date: Wed, 23 May 2018 01:58:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Okay, I see what you and Noam are saying, and in fact what the docstring
> is saying. It's just pretty weird that `add-function' works on
> variables, and `advice-add' works on functions.

Actually `add-function' works for "places" (including
`symbol-function'), so it's the more general and more low-level tool.
`advice-add' is higher-level and specialized on function names.

> It's counterintuitive, and I wonder if the docs couldn't make that
> more explicit.

I always found the doc ok (and explicit), but maybe the names are a bit
arbitrary.


Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]