From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Phil Hagelberg Newsgroups: gmane.emacs.bugs Subject: bug#1102: Modification of patch Date: Mon, 06 Oct 2008 11:24:22 -0700 Message-ID: <873aj9mvjd.fsf@hagelb.org> Reply-To: Phil Hagelberg , 1102@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1223346517 23281 80.91.229.12 (7 Oct 2008 02:28:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Oct 2008 02:28:37 +0000 (UTC) To: 1102@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 07 04:29:33 2008 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 1Kn2KK-0005N1-4H for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Oct 2008 04:29:32 +0200 Original-Received: from localhost ([127.0.0.1]:35281 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kn2JG-0004c9-J2 for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Oct 2008 22:28:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kmv9e-0003wM-Pe for bug-gnu-emacs@gnu.org; Mon, 06 Oct 2008 14:50:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kmv9c-0003vh-3f for bug-gnu-emacs@gnu.org; Mon, 06 Oct 2008 14:50:01 -0400 Original-Received: from [199.232.76.173] (port=46387 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kmv9b-0003vc-W5 for bug-gnu-emacs@gnu.org; Mon, 06 Oct 2008 14:50:00 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:40548) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kmv9b-0000VG-DC for bug-gnu-emacs@gnu.org; Mon, 06 Oct 2008 14:49:59 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m96Invjt014442; Mon, 6 Oct 2008 11:49:57 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m96IU3Ic009790; Mon, 6 Oct 2008 11:30:03 -0700 X-Loop: don@donarmstrong.com Resent-From: Phil Hagelberg Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 06 Oct 2008 18:30:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1102 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1102-submit@emacsbugs.donarmstrong.com id=B1102.12233174678561 (code B ref 1102); Mon, 06 Oct 2008 18:30:03 +0000 Original-Received: (at 1102) by emacsbugs.donarmstrong.com; 6 Oct 2008 18:24:27 +0000 Original-Received: from spunkymail-a1.g.dreamhost.com (mailbigip.dreamhost.com [208.97.132.5]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m96IOOK0008553 for <1102@emacsbugs.donarmstrong.com>; Mon, 6 Oct 2008 11:24:25 -0700 Original-Received: from dynabook (unknown [63.229.31.77]) by spunkymail-a1.g.dreamhost.com (Postfix) with ESMTP id 56A35FE245 for <1102@emacsbugs.donarmstrong.com>; Mon, 6 Oct 2008 11:24:23 -0700 (PDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Mon, 06 Oct 2008 14:50:01 -0400 X-Mailman-Approved-At: Mon, 06 Oct 2008 22:27:24 -0400 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:21197 Archived-At: Changed the patch from the initial bug report. add-hook should allow symbols since it's reasonable to refer to functions that haven't been defined yet. -Phil diff --git a/lisp/subr.el b/lisp/subr.el index d62b38b..d315c27 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1132,6 +1132,8 @@ HOOK is void, it is first set to nil. If HOOK's value is a single function, it is changed to a list of functions." (or (boundp hook) (set hook nil)) (or (default-boundp hook) (set-default hook nil)) + (unless (or (functionp function) (symbolp function)) + (error "`function' argument was not a function")) (if local (unless (local-variable-if-set-p hook) (set (make-local-variable hook) (list t))) ;; Detect the case where make-local-variable was used on a hook