[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ** Graded examples of lambda functions in emacs lisp, how to create
Re: ** Graded examples of lambda functions in emacs lisp, how to create hook variable? **
Tue, 08 Oct 2002 11:19:50 -0600
Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2
Kevin Rodgers <address@hidden> wrote in message news:<address@hidden>...
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
I should have responded: yes, it is particular to Emacs Lisp.
(defvar some-hook nil)
(defun some-function (...)
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.
Yes, that is the idea. For concrete examples, simply grep (search) for
run-hooks and run-hook-with-args in the lisp/*.el and lisp/*/*.el files
of your Emacs distribution.
Then check out advice.el :-)
<a href="mailto:<firstname.lastname@example.org>">Kevin Rodgers</a>