From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23933: 25.1.50; Run a buffer-local hook with mapc Date: Sun, 10 Jul 2016 18:55:21 +0300 Message-ID: <8337nhfpxy.fsf@gnu.org> References: <83d1mlft8v.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1468166185 2058 80.91.229.3 (10 Jul 2016 15:56:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Jul 2016 15:56:25 +0000 (UTC) Cc: kifer@cs.stonybrook.edu, tino.calancha@gmail.com, 23933@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 10 17:56:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bMH5Y-0001jM-Fh for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jul 2016 17:56:12 +0200 Original-Received: from localhost ([::1]:55692 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMH5X-0003yk-LA for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jul 2016 11:56:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMH5R-0003mk-8o for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 11:56:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMH5O-0004Ao-2F for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 11:56:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMH5N-0004Ae-VK for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 11:56:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bMH5N-0005Q8-QP for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 11:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Jul 2016 15:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23933 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23933-submit@debbugs.gnu.org id=B23933.146816614020804 (code B ref 23933); Sun, 10 Jul 2016 15:56:01 +0000 Original-Received: (at 23933) by debbugs.gnu.org; 10 Jul 2016 15:55:40 +0000 Original-Received: from localhost ([127.0.0.1]:45334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMH51-0005PU-TN for submit@debbugs.gnu.org; Sun, 10 Jul 2016 11:55:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMH50-0005PI-RU for 23933@debbugs.gnu.org; Sun, 10 Jul 2016 11:55:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMH4u-00047i-JE for 23933@debbugs.gnu.org; Sun, 10 Jul 2016 11:55:33 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMH4q-00047J-Tw; Sun, 10 Jul 2016 11:55:28 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2902 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bMH4o-0000Jf-IY; Sun, 10 Jul 2016 11:55:27 -0400 In-reply-to: (message from Stefan Monnier on Sun, 10 Jul 2016 11:18:56 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:120763 Archived-At: > From: Stefan Monnier > Cc: Tino Calancha , 23933@debbugs.gnu.org, kifer@cs.stonybrook.edu > Date: Sun, 10 Jul 2016 11:18:56 -0400 > > >> - (mapc #'funcall after-quit-hook-internal) > >> + ;; after-quit-hook-internal is buffer-local; see `ediff-filegroup-action'. > >> + (mapc (lambda (f) (or (eq f t) (funcall f))) after-quit-hook-internal) > >> )) > > Thanks, but why do we use mapc to run hooks? We used to have > > run-hooks there. > > after-quit-hook-internal is a variable, not a hook. Then how come it includes t in its value? > A hook is a symbol whose symbol-value slot holds a list of functions; > this happens to match a dynamically-bound variable, but not > a lexically-bound variable. So you are saying we should convert that variable to a hook?