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

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

the hand that feeds you


From: Andreas Seik
Subject: the hand that feeds you
Date: Thu, 27 Jul 2006 23:31:39 +0200
User-agent: KNode/0.9.0

Hello Newsgroup,

i need code in a hook that is executed only once,
so i tested the following:


(defvar my-hook '())
(defun kill-myself ()
 (insert "only once")(remove-hook 'my-hook 'kill-myself))
(add-hook 'my-hook 'kill-myself)
(run-hooks 'my-hook);; i think it might crash here, but it does not
(run-hooks 'my-hook)

it, seems to work, but i do not trust it.
is it not "biting the hand that feeds you"

thank you
Andreas


reply via email to

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