From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Doc string for run-hooks Date: Sat, 05 Jan 2008 20:03:10 +0100 Message-ID: <477FD46E.5000807@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1199559816 12799 80.91.229.12 (5 Jan 2008 19:03:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Jan 2008 19:03:36 +0000 (UTC) To: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 05 20:03:58 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JBEJD-00069X-0y for ged-emacs-devel@m.gmane.org; Sat, 05 Jan 2008 20:03:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBEIq-0006xW-I3 for ged-emacs-devel@m.gmane.org; Sat, 05 Jan 2008 14:03:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JBEIm-0006wf-C1 for emacs-devel@gnu.org; Sat, 05 Jan 2008 14:03:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JBEIk-0006vq-3H for emacs-devel@gnu.org; Sat, 05 Jan 2008 14:03:23 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBEIj-0006vn-W7 for emacs-devel@gnu.org; Sat, 05 Jan 2008 14:03:22 -0500 Original-Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JBEIj-0004hR-Ex for emacs-devel@gnu.org; Sat, 05 Jan 2008 14:03:21 -0500 Original-Received: from c83-254-148-228.bredband.comhem.se ([83.254.148.228]:60933 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1JBEIe-0007im-3u for emacs-devel@gnu.org; Sat, 05 Jan 2008 20:03:16 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 X-Antivirus: avast! (VPS 080104-0, 2008-01-04), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.148.228 X-Scan-Result: No virus found in message 1JBEIe-0007im-3u. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1JBEIe-0007im-3u e7c644339bbfd6724a1ba2cb925e138e X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:86213 Archived-At: I believe I suggested something like this change to the doc string a year ago. Was not that accepted? (Not entirely sure. It has not been entered in CVS.) =================================================================== RCS file: /cvsroot/emacs/emacs/src/eval.c,v retrieving revision 1.276 diff -u -r1.276 eval.c --- src/eval.c 21 Jan 2007 04:18:16 -0000 1.276 +++ src/eval.c 18 Feb 2007 19:58:07 -0000 @@ -2493,18 +2493,20 @@ DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0, doc: /* Run each hook in HOOKS. -Each argument should be a symbol, a hook variable. -These symbols are processed in the order specified. -If a hook symbol has a non-nil value, that value may be a function -or a list of functions to be called to run the hook. -If the value is a function, it is called with no arguments. -If it is a list, the elements are called, in order, with no arguments. +Each argument should be a symbol, a hook variable. These symbols are +processed in the order specified. If a hook symbol has a non-nil +value, that value should be a list of functions. The functions in the +list are called in order, with no arguments. + +A hook symbols' value can also be a single function which +`run-hooks' calls. But this usage is obsolete. Major modes should not use this function directly to run their mode hook; they should use `run-mode-hooks' instead. Do not use `make-local-variable' to make a hook variable buffer-local. Instead, use `add-hook' and specify t for the LOCAL argument. + usage: (run-hooks &rest HOOKS) */) (nargs, args) int nargs;