From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: proper use of add-function Date: Wed, 23 May 2018 01:58:23 +0200 Message-ID: <874lizgs4g.fsf@web.de> References: <87efi3xppf.fsf@ericabrahamsen.net> <87a7srgtco.fsf@web.de> <87603fxnxi.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1527033424 11466 195.159.176.226 (22 May 2018 23:57:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 22 May 2018 23:57:04 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Eric Abrahamsen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 23 01:56:59 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fLH9H-0002s2-F0 for geh-help-gnu-emacs@m.gmane.org; Wed, 23 May 2018 01:56:59 +0200 Original-Received: from localhost ([::1]:58449 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLHBO-0005OQ-Dm for geh-help-gnu-emacs@m.gmane.org; Tue, 22 May 2018 19:59:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLHAu-0005OH-5l for help-gnu-emacs@gnu.org; Tue, 22 May 2018 19:58:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLHAq-0007w4-7K for help-gnu-emacs@gnu.org; Tue, 22 May 2018 19:58:40 -0400 Original-Received: from mout.web.de ([212.227.15.4]:52495) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fLHAp-0007va-So for help-gnu-emacs@gnu.org; Tue, 22 May 2018 19:58:36 -0400 Original-Received: from drachen.dragon ([188.110.196.170]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LjaR6-1fwWjY3Ica-00bcYj; Wed, 23 May 2018 01:58:24 +0200 In-Reply-To: <87603fxnxi.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Tue, 22 May 2018 16:36:57 -0700") X-Provags-ID: V03:K1:CmoP05KWr5/7X0c/juoq+u4IhoiaR4Jaj2pJzQZd66cWkDOFS2l PESfMWZGXs7rlDoVRS9qonCcQg54XHpFU5KJWSc5xnkvFUfXC8xCDkmnOfQKOrcYbp54JjH 4cRl4mEueG5F4uxoh3LcwCSjrc4BpPxivUmwdo9T8Zkq7SFWLFtJdeyoMU8kiFJqhV964JG 2XsQduFKJeXXMlaRLeqQQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:2LX/cjuETLw=:Rbwavcbc+ZeGYR45iYYFdE eEq0rpJvmm1+TBCAYmiMsOkgDnh/ThEj9YXBfRniT1tx7Pb68WV9Ret8Mt+kdvtU2FKz3TVvF 2wUJHUVBbYABdoQAKSONKGz+2mz7TXrPfqQW1xTdZLqZQrsFl1XfhgnVjiMD4p4kAHqKmVYWj 1xbEYtyRVBpv//T092+ESzALzRYsJMsaoMEhvKOINz4FgvHRgY+82OJmAmD/rddnujKj0aRJa BbR+/QTsjuyuYwN7bDdfuPeJ5PwYxTVoRv46RH9CFwqiUrTlLv6hM9PfG44vkDSHCFWHNd+w1 pu9Q+z/0/uBMjQEaQK4d7jfT1XrBRs+6nmi0ryVO4NRmy2kcKtpkvP2TD/X1nzU+JHyMDWC4b lLDop9rbnFzsVoZP+neiYYX9P8HW08WEiX2tiStmbuM68at6zkRsfHEn0T0fYBH6yVjP/ZdNH RZYIlmAn0PBb5yE4zknOloI0CtGBF52px2hfGt1QUuZ1KptYFAfoGr6ZWhoPgZfN/BJaYAwTd PbZwnV1J/4KqUHbsc/5R8Grn5Ah6WIF36S5ZtrkFH3tpdnqR6kHYpCH4CfWWEUcarb6VCRHy8 zcsWfPWinBzyzLhtV4ZSaRgMKD4Z0TxGUo3xHLIBiLwoNZMJLoSyhEQcuTZyIavrgd+HEsfFM gLDJbkTBFKaoJ2xXh0yBr2wfXA148yvayhOeSkC33rG997PtckkYxj9uI2j5ZuKQINH9a6jpl Xc0sfMXAIEgAX75F7c8hA80LQ2TgLkvhgNzucZGef/uxcGXx/Nin1GGmUAFqPTJXF93SYpWg X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.4 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:116826 Archived-At: Eric Abrahamsen 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.