From unknown Wed Jun 18 23:03:44 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#11342 <11342@debbugs.gnu.org> To: bug#11342 <11342@debbugs.gnu.org> Subject: Status: 24.1.50; HOOK variable name in `add-hook' etc. confusing Reply-To: bug#11342 <11342@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:03:44 +0000 retitle 11342 24.1.50; HOOK variable name in `add-hook' etc. confusing reassign 11342 emacs submitter 11342 michael_heerdegen@web.de severity 11342 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 25 18:44:41 2012 Received: (at submit) by debbugs.gnu.org; 25 Apr 2012 22:44:41 +0000 Received: from localhost ([127.0.0.1]:53197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNAwz-0004zs-Di for submit@debbugs.gnu.org; Wed, 25 Apr 2012 18:44:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55207) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNAwx-0004zf-MD for submit@debbugs.gnu.org; Wed, 25 Apr 2012 18:44:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SNAvy-0000z4-3X for submit@debbugs.gnu.org; Wed, 25 Apr 2012 18:43:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:41089) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNAvy-0000z0-0S for submit@debbugs.gnu.org; Wed, 25 Apr 2012 18:43:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33416) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNAvw-0001Uw-8e for bug-gnu-emacs@gnu.org; Wed, 25 Apr 2012 18:43:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SNAvu-0000yo-3y for bug-gnu-emacs@gnu.org; Wed, 25 Apr 2012 18:43:35 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:53182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNAvt-0000yi-Th for bug-gnu-emacs@gnu.org; Wed, 25 Apr 2012 18:43:34 -0400 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate02.web.de (Postfix) with ESMTP id EFA3C1C3F5212 for ; Thu, 26 Apr 2012 00:43:30 +0200 (CEST) Received: from snow.dragon ([89.204.139.254]) by smtp.web.de (mrweb001) with ESMTPA (Nemesis) id 0McWXI-1Sehof3ytM-00HgJu; Thu, 26 Apr 2012 00:43:30 +0200 Date: Thu, 26 Apr 2012 00:45:26 +0200 Message-Id: <87y5pjjurd.fsf@web.de> From: Michael Heerdegen To: bug-gnu-emacs@gnu.org Subject: 24.1.50; HOOK variable name in `add-hook' etc. confusing X-Provags-ID: V02:K0:T9N1ccELchy0980HZEcaye/wzlOdcuf5mTJJcPRcZxt dEwUgSstA7z5RGu8advM0t2bQi5s0tJ7g2ASa1xx9HZXGCit4i x78ENOKOuEGB0qwkEZkq4pXkiOpLmJhV7Npap3GntpYVMxqrx3 yAMuulniWMQzwePItLuxHjuEq+RPQWUSFlYRwrkHEwAYJhlbiL RDQW9BcG0hrWbjWsGSpINMV9yQtcGTm++nBZasa3UA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: michael_heerdegen@web.de 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: -6.9 (------) Hi, this is just a tiny detail, but confusing for newbies: Turn on eldoc mode in any elisp buffer. If you move point into an `add-hook' or `remove-hook' form, you get e.g. the message remove-hook: (HOOK FUNCTION &optional LOCAL) You could misinterpret that and think that the first argument must be a value representing a hook. But actually it must be a _symbol_ holding a hook. So, I want to make the suggestion to replace the variable `hook' in the definition of `remove-hook' by `hook-var', and to do the same for `add-hook' and `run-hooks'. Then, the eldoc message would be remove-hook: (HOOK-VAR FUNCTION &optional LOCAL) which is more clear. Thanks, Michael. In GNU Emacs 24.1.50.1 (i486-pc-linux-gnu, GTK+ Version 3.4.1) of 2012-04-23 on zelenka, modified by Debian (emacs-snapshot package, version 2:20120423-1) Windowing system distributor `The X.Org Foundation', version 11.0.11104000 Configured using: `configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.1.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1.50/site-lisp:/usr/share/emacs/site-lisp' '--without-compress-info' '--with-crt-dir=/usr/lib/i386-linux-gnu/' '--with-x=yes' '--with-x-toolkit=gtk3' '--with-imagemagick=yes' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2'' From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 25 21:16:14 2012 Received: (at 11342) by debbugs.gnu.org; 26 Apr 2012 01:16:14 +0000 Received: from localhost ([127.0.0.1]:53266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNDJd-0008WA-VK for submit@debbugs.gnu.org; Wed, 25 Apr 2012 21:16:14 -0400 Received: from ironport-out.teksavvy.com ([206.248.143.162]:9133) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNDJc-0008Vx-5W for 11342@debbugs.gnu.org; Wed, 25 Apr 2012 21:16:12 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjEKACxOgk/O+LN8/2dsb2JhbABDtheCDAOBDIEIggkBAQQBVhESBQsLNBIUGA2IQAW2MothgVWDJASkRYFdgwM X-IronPort-AV: E=Sophos;i="4.75,391,1330923600"; d="scan'208";a="176736802" Received: from 206-248-179-124.dsl.teksavvy.com (HELO pastel.home) ([206.248.179.124]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 25 Apr 2012 21:15:10 -0400 Received: by pastel.home (Postfix, from userid 20848) id 2EA8558FE4; Wed, 25 Apr 2012 21:15:10 -0400 (EDT) From: Stefan Monnier To: michael_heerdegen@web.de Subject: Re: bug#11342: 24.1.50; HOOK variable name in `add-hook' etc. confusing Message-ID: References: <87y5pjjurd.fsf@web.de> Date: Wed, 25 Apr 2012 21:15:10 -0400 In-Reply-To: <87y5pjjurd.fsf@web.de> (Michael Heerdegen's message of "Thu, 26 Apr 2012 00:45:26 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11342 Cc: 11342@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -1.9 (-) > You could misinterpret that and think that the first argument must be > a value representing a hook. But actually it must be a _symbol_ > holding a hook. Hooks are represented by a value which is a symbol (and which in turn carries the various functions added to it globally and in each buffer). The symbol's value (usually a list) is *not* the hook value but only one part of it. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 25 23:10:47 2012 Received: (at 11342) by debbugs.gnu.org; 26 Apr 2012 03:10:48 +0000 Received: from localhost ([127.0.0.1]:53316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNF6U-0002k0-Tr for submit@debbugs.gnu.org; Wed, 25 Apr 2012 23:10:47 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:51254) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNF6S-0002jn-E7 for 11342@debbugs.gnu.org; Wed, 25 Apr 2012 23:10:45 -0400 Received: from moweb001.kundenserver.de (moweb001.kundenserver.de [172.19.20.114]) by fmmailgate01.web.de (Postfix) with ESMTP id 4BBDA1AD41FE6 for <11342@debbugs.gnu.org>; Thu, 26 Apr 2012 05:09:42 +0200 (CEST) Received: from snow.dragon ([89.204.139.254]) by smtp.web.de (mrweb001) with ESMTPA (Nemesis) id 0M3Slc-1S5Zi82p4C-00r1JN; Thu, 26 Apr 2012 05:09:41 +0200 From: Michael Heerdegen To: 11342@debbugs.gnu.org Subject: Re: bug#11342: 24.1.50; HOOK variable name in `add-hook' etc. confusing In-Reply-To: (Stefan Monnier's message of "Wed, 25 Apr 2012 21:15:10 -0400") Date: Thu, 26 Apr 2012 04:07:33 +0200 References: <87y5pjjurd.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) Received: from web.de by mxint04.web.de with esmtp (WEB.DE 4.110 #1) id 1SNE5R-00084D-00 for michael_heerdegen@web.de; Thu, 26 Apr 2012 04:05:37 +0200 Received: from moweb001.kundenserver.de (moweb001.kundenserver.de [172.19.20.114]) by fmmailgate01.web.de (Postfix) with ESMTP id 109B81AD41F2F for ; Thu, 26 Apr 2012 04:05:37 +0200 (CEST) Received: from snow.dragon ([89.204.139.254]) by smtp.web.de (mrweb001) with ESMTPA (Nemesis) id 0Lcxfc-1RwelE2NYO-00iC3c; Thu, 26 Apr 2012 04:05:37 +0200 Message-ID: <878vhjjifr.fsf@web.de> MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V02:K0:EA8Z3PW98cLCzPg6txMlaqjHUb5uPidxQ+Ol+A5JCSY cApGUMyI4V10a6dCgmsOqhqvWpjaXfmWMJgoTTTGfRzTN7f9+8 /aF97Q9G6rS06DEJB4WyQS8cKqW5CbxPYxUAGvjXQNWA3gQt++ iN0y5ljMUrNAFr2TwjpLZZaguZK/kP0Vo9VRcssX9q9D3kXTPr 3qkpzdMIJlhaRzruxghZo2ByJxOa66C7c4VusFYqw4= X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11342 Cc: monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -1.9 (-) Stefan Monnier writes: > > You could misinterpret that and think that the first argument must > > be a value representing a hook. But actually it must be a _symbol_ > > holding a hook. > > Hooks are represented by a value which is a symbol (and which in turn > carries the various functions added to it globally and in each buffer). > The symbol's value (usually a list) is *not* the hook value but only one > part of it. Thanks for the clarification, I didn't realize that, obviously. The manual sometimes calls these values being symbols "hook", and sometimes "hook variable". Ok, so, these arguments of `add-hook' and `remove-hook' must be variables (symbols) representing a hook. My proposal to rename the `hook' argument to `hook-var' would still be reasonable. Sure, there is no error in the current naming. But it would not be false, and clearer than now for people that didn't yet realize this part of the nomenclature, like me. Please decide yourself - I just have the feeling that many people stumble at that point and don't know if they must use a quote before the hook variable or not. OTOH, if there are good reasons to reject my proposal, please close this report. Thanks, Michael From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 26 04:04:45 2012 Received: (at 11342) by debbugs.gnu.org; 26 Apr 2012 08:04:46 +0000 Received: from localhost ([127.0.0.1]:53463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNJgz-0003SH-B7 for submit@debbugs.gnu.org; Thu, 26 Apr 2012 04:04:45 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:43719) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNJgv-0003S3-70 for 11342@debbugs.gnu.org; Thu, 26 Apr 2012 04:04:42 -0400 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3VdW4T3tKtz4KMnF; Thu, 26 Apr 2012 10:03:37 +0200 (CEST) Received: from igel.home (ppp-88-217-116-87.dynamic.mnet-online.de [88.217.116.87]) by mail.mnet-online.de (Postfix) with ESMTPA id 3VdW4T1vqxz4KK3q; Thu, 26 Apr 2012 10:03:37 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 9D09ECA29F; Thu, 26 Apr 2012 10:03:36 +0200 (CEST) From: Andreas Schwab To: Michael Heerdegen Subject: Re: bug#11342: 24.1.50; HOOK variable name in `add-hook' etc. confusing References: <87y5pjjurd.fsf@web.de> <878vhjjifr.fsf@web.de> X-Yow: I'm wet! I'm wild! Date: Thu, 26 Apr 2012 10:03:36 +0200 In-Reply-To: <878vhjjifr.fsf@web.de> (Michael Heerdegen's message of "Thu, 26 Apr 2012 04:07:33 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11342 Cc: 11342@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -1.9 (-) Michael Heerdegen writes: > The manual sometimes calls these values being symbols "hook", and > sometimes "hook variable". * (elisp) Hooks:: A "hook" is a variable where you can store a function or functions to be called on a particular occasion by an existing program. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 26 08:48:55 2012 Received: (at 11342) by debbugs.gnu.org; 26 Apr 2012 12:48:55 +0000 Received: from localhost ([127.0.0.1]:53824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNO7y-0006OM-No for submit@debbugs.gnu.org; Thu, 26 Apr 2012 08:48:54 -0400 Received: from ironport-out.teksavvy.com ([206.248.143.162]:29844) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNO7w-0006OA-5O for 11342@debbugs.gnu.org; Thu, 26 Apr 2012 08:48:52 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjEKACxOgk/O+LN8/2dsb2JhbABDtheCDAOBDIEIggkBAQQBViMQCzQSFBgNJIgcBbYyi2GEeQSkRYFdgwM X-IronPort-AV: E=Sophos;i="4.75,391,1330923600"; d="scan'208";a="176809645" Received: from 206-248-179-124.dsl.teksavvy.com (HELO pastel.home) ([206.248.179.124]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 26 Apr 2012 08:47:47 -0400 Received: by pastel.home (Postfix, from userid 20848) id 514DD59005; Thu, 26 Apr 2012 08:47:47 -0400 (EDT) From: Stefan Monnier To: Andreas Schwab Subject: Re: bug#11342: 24.1.50; HOOK variable name in `add-hook' etc. confusing Message-ID: References: <87y5pjjurd.fsf@web.de> <878vhjjifr.fsf@web.de> Date: Thu, 26 Apr 2012 08:47:47 -0400 In-Reply-To: (Andreas Schwab's message of "Thu, 26 Apr 2012 10:03:36 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11342 Cc: Michael Heerdegen , 11342@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -1.9 (-) >> The manual sometimes calls these values being symbols "hook", and >> sometimes "hook variable". > * (elisp) Hooks:: > A "hook" is a variable where you can store a function or functions to > be called on a particular occasion by an existing program. Actually, we need to rework some of that, because it can't be just "any variable": it has to be a dynamically-scoped variable, or rather it has to be a symbol. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 26 17:31:12 2012 Received: (at submit) by debbugs.gnu.org; 26 Apr 2012 21:31:12 +0000 Received: from localhost ([127.0.0.1]:54777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNWHN-0007BQ-6G for submit@debbugs.gnu.org; Thu, 26 Apr 2012 17:31:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59182) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNWHJ-0007At-LK for submit@debbugs.gnu.org; Thu, 26 Apr 2012 17:31:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SNWGE-0002C8-If for submit@debbugs.gnu.org; Thu, 26 Apr 2012 17:29:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,RCVD_IN_XBL autolearn=ham version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:51157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNWGE-0002Bw-FK for submit@debbugs.gnu.org; Thu, 26 Apr 2012 17:29:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNWGC-00068N-Q4 for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2012 17:29:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SNWGA-0002Ag-V4 for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2012 17:29:56 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:52179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNWGA-0002AY-OH for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2012 17:29:54 -0400 Received: from moweb001.kundenserver.de (moweb001.kundenserver.de [172.19.20.114]) by fmmailgate02.web.de (Postfix) with ESMTP id 2879A1C3F4E44 for ; Thu, 26 Apr 2012 23:29:53 +0200 (CEST) Received: from snow.dragon ([89.204.154.202]) by smtp.web.de (mrweb001) with ESMTPA (Nemesis) id 0LgYi5-1RtM2v0KYf-00nyMo; Thu, 26 Apr 2012 23:29:52 +0200 From: Michael Heerdegen To: bug-gnu-emacs@gnu.org Subject: Re: bug#11342: 24.1.50; HOOK variable name in `add-hook' etc. confusing References: <87y5pjjurd.fsf@web.de> <878vhjjifr.fsf@web.de> Date: Thu, 26 Apr 2012 23:31:48 +0200 In-Reply-To: (Andreas Schwab's message of "Thu, 26 Apr 2012 10:03:36 +0200") Message-ID: <87haw6qiwr.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V02:K0:ckDfrbDm0LO/58siP4pRz/ILfuJnhkiJyawe3NFwkwX Dl9jdnDfSuRaVC0UGhXUD/YzpaeMDqmgFT/zSg3b13thIXZNrA 9iNlmvOiLqhs70CsjXpexd2RBgZxKZTEUQHgF4PWr16wJzxSNH k3frmxfS//Oo5FZVnXYOuHrU0Df3J90Q/1GN+LoWIETB7RwPJi VsxxNVEbr2grUh7lo9a7AZcagVEepGJq9BO2noELsA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -6.9 (------) Andreas Schwab writes: > > The manual sometimes calls these values being symbols "hook", and > > sometimes "hook variable". > > * (elisp) Hooks:: > > A "hook" is a variable where you can store a function or functions to > be called on a particular occasion by an existing program. File: elisp, Node: Setting Hooks -- Function: add-hook hook function &optional append local This function is the handy way to add function FUNCTION to hook variable HOOK. -- Function: remove-hook hook function &optional local This function removes FUNCTION from the hook variable HOOK. Michael From debbugs-submit-bounces@debbugs.gnu.org Tue May 15 10:47:04 2012 Received: (at 11342-done) by debbugs.gnu.org; 15 May 2012 14:47:04 +0000 Received: from localhost ([127.0.0.1]:56158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUJ1k-0004t9-8i for submit@debbugs.gnu.org; Tue, 15 May 2012 10:47:04 -0400 Received: from relais.videotron.ca ([24.201.245.36]:64978) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUJ1i-0004si-8b for 11342-done@debbugs.gnu.org; Tue, 15 May 2012 10:47:02 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from fmsmemgm.homelinux.net ([24.201.208.110]) by VL-VM-MR001.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0M4200IZBJQ8WK80@VL-VM-MR001.ip.videotron.ca> for 11342-done@debbugs.gnu.org; Tue, 15 May 2012 10:46:56 -0400 (EDT) Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 00A91AE233; Tue, 15 May 2012 10:46:54 -0400 (EDT) From: Stefan Monnier To: michael_heerdegen@web.de Subject: Re: bug#11342: 24.1.50; HOOK variable name in `add-hook' etc. confusing Message-id: References: <87y5pjjurd.fsf@web.de> Date: Tue, 15 May 2012 10:46:54 -0400 In-reply-to: <87y5pjjurd.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11342-done Cc: 11342-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -1.2 (-) > remove-hook: (HOOK FUNCTION &optional LOCAL) > You could misinterpret that and think that the first argument must be > a value representing a hook. But actually it must be a _symbol_ > holding a hook. Actually, the docstring says "HOOK should be a symbol", so the problem is only that you base your decision on the eldoc info, which is necessarily too limited to be trusted to give that kind of detail. I find that changing the argument name makes the code and docstring too verbose for my taste, so I don't think it's worth the trouble. Stefan From unknown Wed Jun 18 23:03:44 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 13 Jun 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator