[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: proper use of add-function
From: |
Eric Abrahamsen |
Subject: |
Re: proper use of add-function |
Date: |
Tue, 22 May 2018 17:09:19 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Michael Heerdegen <michael_heerdegen@web.de> writes:
> 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.
I guess that's why I kept trying to make this work -- I thought the
`symbol-function' place would allow me to apply my advice to
'canonically-space-region. Why doesn't that work?