From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: doc on define-minor-mode hook variable(s) Date: Sun, 5 Mar 2006 13:14:50 -0800 Message-ID: References: <871wxgpq2y.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1141593349 11006 80.91.229.2 (5 Mar 2006 21:15:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 5 Mar 2006 21:15:49 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 05 22:15:47 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FG0Zm-0005d4-5U for ged-emacs-devel@m.gmane.org; Sun, 05 Mar 2006 22:15:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FG0Zt-00049y-M0 for ged-emacs-devel@m.gmane.org; Sun, 05 Mar 2006 16:15:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FG0Za-0003K3-JS for emacs-devel@gnu.org; Sun, 05 Mar 2006 16:15:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FG0ZV-00038m-Dj for emacs-devel@gnu.org; Sun, 05 Mar 2006 16:15:24 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FG0ZV-00038i-9x for emacs-devel@gnu.org; Sun, 05 Mar 2006 16:15:21 -0500 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1FG0bb-0006Hv-LR for emacs-devel@gnu.org; Sun, 05 Mar 2006 16:17:31 -0500 Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.186.50]) by agminet01.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id k25LFBk0028114 for ; Sun, 5 Mar 2006 15:15:11 -0600 Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id k25LFBUS031250 for ; Sun, 5 Mar 2006 14:15:11 -0700 Original-Received: from dradamslap (dhcp-amer-csvpn-gw1-141-144-64-199.vpn.oracle.com [141.144.64.199]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id k25LFAJS031244 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Sun, 5 Mar 2006 14:15:10 -0700 Original-To: "Emacs-Devel" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <871wxgpq2y.fsf-monnier+emacs@gnu.org> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE 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:51248 Archived-At: > exiting the mode. What's not clear from this doc is whether > `define-minor-mode' creates a variable named `MODE-hook'. Here is the explanation: a hook is not a *variable* but a *symbol*. A hook has various elements, all of which happen to be currently stored in the value part of the symbol (some in the buffer-local parts, others in the global part). So whether or not a variable is created is not really relevant: the symbol is "created" and that's all that's needed. PS: Yes, this means that the only way to figure out whether a hook exists or not is by actually placing something on it and checking whether/when it gets triggered. That's how hooks have been defined. OK, thanks for the clarification. I don't see how that substantially alters my point (or even most of what I wrote): more should be said about the hook _symbol_ `MODE-hook' in the doc. Users should be informed how they can take advantage of this feature. My concern is not really whether or not these hooks exist. My concern is that they are provided for by `define-minor-mode' but the behavior related to them is not sufficiently documented. IOW, important functionality provided by `define-minor-mode' is not revealed by the doc.