unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* the hand that feeds you
@ 2006-07-27 21:31 Andreas Seik
  2006-07-27 22:05 ` Harald Hanche-Olsen
  2006-07-28  6:50 ` wenbinye
  0 siblings, 2 replies; 5+ messages in thread
From: Andreas Seik @ 2006-07-27 21:31 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-07-28  9:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-27 21:31 the hand that feeds you Andreas Seik
2006-07-27 22:05 ` Harald Hanche-Olsen
2006-07-27 23:43   ` Kevin Rodgers
     [not found]   ` <mailman.4562.1154043820.9609.help-gnu-emacs@gnu.org>
2006-07-28  9:12     ` Harald Hanche-Olsen
2006-07-28  6:50 ` wenbinye

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).