From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: 1) (elisp) `Advising Named Functions', 2) search filtering example Date: Mon, 17 Oct 2016 10:52:42 -0400 Message-ID: References: <5a44a850-e4fc-4c9f-a266-c74766810ba1@default> <1807679d-1125-4afe-81b7-b8d8e78aa2c6@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1476716254 25764 195.159.176.226 (17 Oct 2016 14:57:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Oct 2016 14:57:34 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 17 16:57:29 2016 Return-path: Envelope-to: ged-emacs-devel@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 1bw9Lb-0003Sd-Lp for ged-emacs-devel@m.gmane.org; Mon, 17 Oct 2016 16:57:03 +0200 Original-Received: from localhost ([::1]:33701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bw9Ld-0004tf-SS for ged-emacs-devel@m.gmane.org; Mon, 17 Oct 2016 10:57:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bw9Hz-0002V9-Oo for emacs-devel@gnu.org; Mon, 17 Oct 2016 10:53:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bw9Hw-000160-Nj for emacs-devel@gnu.org; Mon, 17 Oct 2016 10:53:19 -0400 Original-Received: from [195.159.176.226] (port=50173 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bw9Hw-00015u-HP for emacs-devel@gnu.org; Mon, 17 Oct 2016 10:53:16 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1bw9Hg-00021M-Ue for emacs-devel@gnu.org; Mon, 17 Oct 2016 16:53:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 20 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:ZJLjrZoh8B2lw8JHv/ZqIhByOtM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:208359 Archived-At: > You're right. I did have the impression that add-function was > considered to be okay, just like add-hook is. It is. > the important distinction is between the thing being added to, not the > function used to do the adding. That's right. For `foo-predicate` and `foo-bar-function`, modifying the variable is the raison d'être of that variable, so it's not harmful: programmers know that by design this value may change. On the contrary (symbol-function ) is the value associated to a function name and programmers usually expect that function to be defined at somewhere in a file (in a single place) and the value is expected (by the programmer and by other chunks of code which call it) to be faithful to the file's code. Stefan