From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bug-gnu-emacs@gnu.org (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#5026: marked as done (23.1; add-hook buffer local vs single func) Date: Fri, 01 Jan 2010 17:17:01 +0000 Message-ID: References: <87ljghg2z5.fsf@stupidchicken.com> <87bpitlzpy.fsf@blah.blah> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1262366221-22844-0" X-Trace: ger.gmane.org 1262366386 26012 80.91.229.12 (1 Jan 2010 17:19:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Jan 2010 17:19:46 +0000 (UTC) Cc: emacs-bug-tracker@debbugs.gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 01 18:19:38 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NQlA1-0002uM-Ba for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Jan 2010 18:19:37 +0100 Original-Received: from localhost ([127.0.0.1]:49491 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQlA1-0004CA-KM for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Jan 2010 12:19:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NQl9w-0004C5-Ub for bug-gnu-emacs@gnu.org; Fri, 01 Jan 2010 12:19:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NQl9m-0003ys-CD for bug-gnu-emacs@gnu.org; Fri, 01 Jan 2010 12:19:31 -0500 Original-Received: from [199.232.76.173] (port=54338 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQl9b-0003ow-KQ; Fri, 01 Jan 2010 12:19:11 -0500 Original-Received: from [140.186.70.43] (port=54957 helo=debbugs.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NQl9b-00052D-6e; Fri, 01 Jan 2010 12:19:11 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NQl7V-0005wU-Qj; Fri, 01 Jan 2010 12:17:01 -0500 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: closed 5026 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33823 Archived-At: This is a multi-part message in MIME format... ------------=_1262366221-22844-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Fri, 01 Jan 2010 12:16:30 -0500 with message-id <87ljghg2z5.fsf@stupidchicken.com> and subject line Re: bug#5026: 23.1; add-hook buffer local vs single func has caused the Emacs bug report #5026, regarding 23.1; add-hook buffer local vs single func to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact bug-gnu-emacs@gnu.org immediately.) --=20 5026: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D5026 Emacs Bug Tracking System Contact bug-gnu-emacs@gnu.org with problems ------------=_1262366221-22844-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 23 Nov 2009 21:05:34 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.8 required=4.0 tests=AWL,FOURLA,FVGT_m_MULTI_ODD autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nANL5W6R022234 for ; Mon, 23 Nov 2009 13:05:34 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NCg6F-00008j-8q for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2009 16:05:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NCg6A-0008VH-Hl for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2009 16:05:30 -0500 Received: from [199.232.76.173] (port=59948 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCg6A-0008V4-BT for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2009 16:05:26 -0500 Received: from mailout1-1.pacific.net.au ([61.8.2.208]:41226 helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NCg69-0007S8-KM for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2009 16:05:26 -0500 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id AB31750F9A1 for ; Tue, 24 Nov 2009 08:05:16 +1100 (EST) Received: from blah.blah (ppp27BB.dyn.pacific.net.au [61.8.39.187]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id E68BD8C0D for ; Tue, 24 Nov 2009 08:05:15 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1NCg5S-0003h7-9f for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2009 08:04:42 +1100 From: Kevin Ryde To: bug-gnu-emacs@gnu.org Subject: 23.1; add-hook buffer local vs single func Date: Tue, 24 Nov 2009 08:04:41 +1100 Message-ID: <87bpitlzpy.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Evaluating (progn (defvar foo nil) (defun func1 () (error "this is func 1")) (defun func2 () (message "this if func 2")) (setq foo 'func1) (add-hook 'foo 'func2 nil ;; prepend t) ;; buffer-local (run-hooks 'foo)) returns nil, where I expected the run-hooks to run both func2 and func1, raising the error in func1. The elisp manual under "Setting Hooks" says `add-hook' can handle the cases where ... its value is a single function; but that doesn't seem to be so when extending a single function to a buffer-local value. I suspect it's run-hooks which should be blamed rather than add-hook. Should run-hooks allow a single-function global value when it follows a `t' from a local value? I expect this arises only rarely. But if it does then it's a pretty subtle way to miss out on a function you thought you had in a hook. In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5) of 2009-09-14 on raven, modified by Debian configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_AU value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default-enable-multibyte-characters: t ------------=_1262366221-22844-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 5026-done) by debbugs.gnu.org; 1 Jan 2010 17:16:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NQl76-0005wA-CA for submit@debbugs.gnu.org; Fri, 01 Jan 2010 12:16:36 -0500 Received: from pantheon-po39.its.yale.edu ([130.132.50.100]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NQl75-0005vy-FP for 5026-done@emacsbugs.donarmstrong.com; Fri, 01 Jan 2010 12:16:35 -0500 Received: from furry (dhcp128036014103.central.yale.edu [128.36.14.103]) (authenticated bits=0) by pantheon-po39.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o01HGUTP022235 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 1 Jan 2010 12:16:30 -0500 Received: by furry (Postfix, from userid 1000) id 4B839C05D; Fri, 1 Jan 2010 12:16:30 -0500 (EST) From: Chong Yidong To: Stefan Monnier , Kevin Ryde Subject: Re: bug#5026: 23.1; add-hook buffer local vs single func Date: Fri, 01 Jan 2010 12:16:30 -0500 Message-ID: <87ljghg2z5.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: 3.2 (+++) X-Debbugs-Envelope-To: 5026-done Cc: 5026-done@emacsbugs.donarmstrong.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 2.8 (++) > > I suspect it's run-hooks which should be blamed rather than add-hook. > > Should run-hooks allow a single-function global value when it follows a > > `t' from a local value? > > Actually, I think that run-hooks, add-hook and friends should throw at > least warnings when faced with this kind of obsolete "single > function" use. Still, as long as we're still supporting the obsolete format, it's easy enough to fix run-hooks to recognize it; I've checked in such a fix. ------------=_1262366221-22844-0--