all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.