unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Trigger action at exit?
@ 2008-02-29 22:30 John Trammell
  2008-03-02 17:25 ` Ludovic Courtès
  0 siblings, 1 reply; 12+ messages in thread
From: John Trammell @ 2008-02-29 22:30 UTC (permalink / raw)
  To: guile-user

Hi all:

I'm trying to trigger an action at script exit, similar to Perl's "END
{...}" construct.

After a little searching I've stumbled across "add-hook! exit-hook
...", but for the life of me I can't seem to get it to do what I want.
 Here's a taste of what I'm looking for:

   (define foo (lambda () (display "foo") (newline)))
   (add-hook! exit-hook foo)
   (run-hook exit-hook)

I'd like something like this, that doesn't need the explicit
"run-hook" at the end.  Ideas?

Thanks,
JT




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

end of thread, other threads:[~2008-03-05 21:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-29 22:30 Trigger action at exit? John Trammell
2008-03-02 17:25 ` Ludovic Courtès
2008-03-03 20:44   ` Neil Jerram
2008-03-03 21:53     ` Ludovic Courtès
2008-03-03 22:17       ` Neil Jerram
2008-03-04 10:25         ` Ludovic Courtès
2008-03-04 17:03           ` John Trammell
2008-03-05 21:14           ` Neil Jerram
2008-03-03 21:22   ` John Trammell
2008-03-03 21:40     ` Ludovic Courtès
2008-03-03 22:27       ` John Trammell
2008-03-05 21:27         ` Neil Jerram

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).