From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Mark A. Flacy" Newsgroups: gmane.emacs.help Subject: Re: ** Graded examples of lambda functions in emacs lisp, how to create hook variable? ** Date: 08 Oct 2002 11:16:32 -0500 Organization: Nortel Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: <9e8ebeb2.0210070738.1b12118d@posting.google.com> <3DA1C8EC.6070801@ihs.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1034094854 18645 127.0.0.1 (8 Oct 2002 16:34:14 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 8 Oct 2002 16:34:14 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17yxBk-00047e-00 for ; Tue, 08 Oct 2002 18:26:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17yxBV-0002qN-00; Tue, 08 Oct 2002 12:26:13 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!torn!qcarhaaa.nortelnetworks.com!bcarh189.ca.nortel.com!bcarh8ab.ca.nortel.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 31 Original-NNTP-Posting-Host: pngcd0ja.us.nortel.com User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-Xref: shelby.stanford.edu gnu.emacs.help:105840 comp.emacs:75142 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2387 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2387 >>>>> "gnuist006" == gnuist006 writes: gnuist006> gnuist006> Kevin Rodgers wrote in message news:<3DA1C8EC.6070801@ihs.com>... >> gnuist wrote: >> >> > One last question at this stage: I know how you "add-hook" but how do you >> > create a hook variable in the first place? Is it something particular to >> > emacs? >> >> >> (defvar some-hook nil) >> >> >> (defun some-function (...) >> ... >> (run-hooks 'some-hook) >> ...) gnuist006> gnuist006> defvar creates a hook variable. gnuist006> run-hooks associates some-hook with the some-function. gnuist006> gnuist006> Now one writes lambda functions associated with the some-hook gnuist006> without modifying the some-function???? gnuist006> gnuist006> Is that the idea? The post was incomplete. Perhaps the author gnuist006> know too much for us. But I want a simple concrete minimal example gnuist006> of running code. One would expect you to work a little harder at this. What does "C-h f run-hooks " tell you?