From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "John Trammell" Newsgroups: gmane.lisp.guile.user Subject: Trigger action at exit? Date: Fri, 29 Feb 2008 16:30:51 -0600 Message-ID: <68dbb6fe0802291430g42240937u1241348a85021e73@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1204324266 13403 80.91.229.12 (29 Feb 2008 22:31:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Feb 2008 22:31:06 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Feb 29 23:31:32 2008 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JVDlM-0007te-32 for guile-user@m.gmane.org; Fri, 29 Feb 2008 23:31:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JVDkp-0003sS-Id for guile-user@m.gmane.org; Fri, 29 Feb 2008 17:30:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JVDkl-0003sN-Fs for guile-user@gnu.org; Fri, 29 Feb 2008 17:30:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JVDkj-0003r2-5j for guile-user@gnu.org; Fri, 29 Feb 2008 17:30:54 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JVDki-0003qe-Tj for guile-user@gnu.org; Fri, 29 Feb 2008 17:30:52 -0500 Original-Received: from hs-out-0708.google.com ([64.233.178.242]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JVDki-0004Ob-V5 for guile-user@gnu.org; Fri, 29 Feb 2008 17:30:53 -0500 Original-Received: by hs-out-0708.google.com with SMTP id j58so3104951hsj.10 for ; Fri, 29 Feb 2008 14:30:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=4BVCLeTX+nd/sZV2ve8IkPrxhp2XuwfcMahPheOlIB0=; b=IREZkGK1ScBaC3bE0v6dyrOHnjfVLadXn7ZrEQUeL2LWdgThva2WyNG6IpwyNd9trEUEfkAAvAaxow8myeObTEauHwuRyy4PRMwaakrHxrLVCrZ5bwLBuNi2Syl8MacBxkbAPVPOHhqkMvRDmjbaHBvZObY39wYzZowemrEJcrg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=fskKNCi/CetXsEinozMKUnT5LkZf3Y8ybQZ7aSyYm9M1eHNW9ghqOdInhmk3KS9Cma9Qm9ICGteZRh6exPRbGGlyNHXw1EZgX+qzWqkxaZwkTWvhZwkdlwQ8N0MuPVMZaQt7xZ2BTjoBMB51yjx/2Z17fA2O4L3HDw6fNul23T0= Original-Received: by 10.100.250.12 with SMTP id x12mr20649924anh.82.1204324251786; Fri, 29 Feb 2008 14:30:51 -0800 (PST) Original-Received: by 10.100.138.7 with HTTP; Fri, 29 Feb 2008 14:30:51 -0800 (PST) Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 (Google crawlbot) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6430 Archived-At: 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