From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: add-hook Date: Sun, 09 Nov 2003 22:01:07 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1068433783 23546 80.91.224.253 (10 Nov 2003 03:09:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 Nov 2003 03:09:43 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Nov 10 04:09:41 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AJ2Qv-0002ke-00 for ; Mon, 10 Nov 2003 04:09:41 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AJ2Qu-00075Z-00 for ; Mon, 10 Nov 2003 04:09:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AJ3NG-0006xd-Ax for emacs-devel@quimby.gnus.org; Sun, 09 Nov 2003 23:09:58 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AJ3NA-0006xQ-Kk for emacs-devel@gnu.org; Sun, 09 Nov 2003 23:09:52 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AJ3Me-0006od-HU for emacs-devel@gnu.org; Sun, 09 Nov 2003 23:09:51 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AJ3Me-0006oW-9c for emacs-devel@gnu.org; Sun, 09 Nov 2003 23:09:20 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.24) id 1AJ2Id-0004J5-PS; Sun, 09 Nov 2003 22:01:07 -0500 Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17741 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17741 Today I took another look at the code in add-hook and this time I could clearly see the problem that I originally fixed. This code ;; Detect the case where make-local-variable was used on a hook ;; and do what we used to do. (unless (and (consp (symbol-value hook)) (memq t (symbol-value hook))) (setq local t))) claims to detect the case where the hook variable was made local in the wrong way, but it doesn't really do that. It will set `local' to t in cases where the hook is not actually local. In fact, in the simplest case, where the hook variable has no local binding, and no local hooks have ever been put on it, this code will still set `local' to t. That is very confusing, and contradicts what the comment says. This needs to be cleaned up somehow.