From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: gnuist006@hotmail.com (gnuist006) Newsgroups: gmane.emacs.help Subject: Re: ** Graded examples of lambda functions in emacs lisp, how to create hook variable? ** Date: 8 Oct 2002 07:28:28 -0700 Organization: http://groups.google.com/ 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 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1034087488 17895 127.0.0.1 (8 Oct 2002 14:31:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 8 Oct 2002 14:31:28 +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 17yvOR-0004eU-00 for ; Tue, 08 Oct 2002 16:31:27 +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 17yvOK-0005aT-00; Tue, 08 Oct 2002 10:31:20 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 25 Original-NNTP-Posting-Host: 209.179.38.48 Original-X-Trace: posting.google.com 1034087308 3161 127.0.0.1 (8 Oct 2002 14:28:28 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 8 Oct 2002 14:28:28 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:105835 comp.emacs:75131 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:2383 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2383 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) > ...) defvar creates a hook variable. run-hooks associates some-hook with the some-function. Now one writes lambda functions associated with the some-hook without modifying the some-function???? Is that the idea? The post was incomplete. Perhaps the author know too much for us. But I want a simple concrete minimal example of running code.