help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ** Graded examples of lambda functions in emacs lisp, how to create


From: Mark A. Flacy
Subject: Re: ** Graded examples of lambda functions in emacs lisp, how to create hook variable? **
Date: 08 Oct 2002 11:16:32 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

>>>>> "gnuist006" == gnuist006  <gnuist006@hotmail.com> writes:
gnuist006> 
gnuist006> Kevin Rodgers <kevinr@ihs.com> 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 <RETURN>" tell you?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]