From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.bugs Subject: bug#8387: 24.0.50; `run-hook-with-args' return value has changed Date: Thu, 31 Mar 2011 02:25:34 -0400 Message-ID: <877hbfn6w1.fsf@maru.md5i.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1301553444 26361 80.91.229.12 (31 Mar 2011 06:37:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 31 Mar 2011 06:37:24 +0000 (UTC) To: 8387@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 31 08:37:19 2011 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.69) (envelope-from ) id 1Q5BVO-0007zX-NT for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Mar 2011 08:37:19 +0200 Original-Received: from localhost ([127.0.0.1]:47616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5BVO-0006F4-BW for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Mar 2011 02:37:18 -0400 Original-Received: from [140.186.70.92] (port=60592 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5BVI-0006Ez-SC for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2011 02:37:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5BVH-0006O5-HM for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2011 02:37:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44388) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5BVH-0006O1-A8 for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2011 02:37:11 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Q5BLS-00068S-Hz; Thu, 31 Mar 2011 02:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Welsh Duggan Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 31 Mar 2011 06:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.130155276623519 (code B ref -1); Thu, 31 Mar 2011 06:27:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 Mar 2011 06:26:06 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q5BKX-00067I-75 for submit@debbugs.gnu.org; Thu, 31 Mar 2011 02:26:05 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q5BKR-00066l-Df for submit@debbugs.gnu.org; Thu, 31 Mar 2011 02:26:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5BKC-00033H-Da for submit@debbugs.gnu.org; Thu, 31 Mar 2011 02:25:54 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:35963) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5BKC-000336-B2 for submit@debbugs.gnu.org; Thu, 31 Mar 2011 02:25:44 -0400 Original-Received: from [140.186.70.92] (port=49607 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5BKA-0001tN-UM for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2011 02:25:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5BK9-00032g-Ie for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2011 02:25:42 -0400 Original-Received: from md5i.com ([75.151.244.229]:37205 helo=maru.md5i.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5BK9-00031O-FQ for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2011 02:25:41 -0400 Original-Received: from md5i by maru.md5i.com with local (Exim 4.74) (envelope-from ) id 1Q5BK2-0006D3-Eq for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2011 02:25:34 -0400 User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 31 Mar 2011 02:27:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.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: , 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:45514 Archived-At: emacs -Q (defun foo (arg) 'test) C-j (defvar foo-hook '(foo)) C-j (run-hook-with-args 'foo-hook 'foo) C-j In the past, this would return 'test instead of nil. This breaks some code, in particular bbdb, which has the following: (defun bbdb-canonicalize-address (net) ;; call the bbdb-canonicalize-net-hook repeatedly until it returns a ;; value eq to the value passed in. This implies that it can't ;; destructively modify the string. ;; Hysterical Raisins: This is a function, not a hook. In order to ;; make this hook a hook, we'll quietly convert a single function ;; into a hook list. We should really warn the user that we're ;; doing this, and advise them to update their configuration ;; accordingly. For the release, maybe. (if (functionp bbdb-canonicalize-net-hook) (setq bbdb-canonicalize-net-hook (list bbdb-canonicalize-net-hook))) ;; Now, do the hook run. Note, if you mess up, it's possible that ;; BBDB will get stuck here oscillating between various definitions ;; of the canonical address. (while (not (equal net (setq net (run-hook-with-args 'bbdb-canonicalize-net-hook net))))) net) I don't have time to test this right now, but I would guess this started happening in the following commit: 2011-03-28 Stefan Monnier * keyboard.c (safe_run_hook_funcall): New function. (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error, don't set the hook to nil, but remove the offending function instead. (Qcommand_hook_internal): Remove, unused. (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define Vcommand_hook_internal. * eval.c (enum run_hooks_condition): Remove. (funcall_nil, funcall_not): New functions. (run_hook_with_args): Call each function through a `funcall' argument. Remove `cond' argument, now redundant. (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success) (Frun_hook_with_args_until_failure): Adjust accordingly. (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions. In GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.3) of 2011-03-30 on maru Windowing system distributor `The X.Org Foundation', version 11.0.10707000 configured using `configure '--without-toolkit-scroll-bars'' 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_US.utf8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t -- Michael Welsh Duggan (md5i@md5i.com)