Add HOOK-IN-LIST?.
authorChris Hanson <org/chris-hanson/cph>
Sat, 30 Oct 2004 03:59:06 +0000 (03:59 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sat, 30 Oct 2004 03:59:06 +0000 (03:59 +0000)
v7/src/runtime/global.scm
v7/src/runtime/runtime.pkg

index 284664c6a02f158a4d49a8cc9901dca820162265..2e1ed9b56ec695f20be5113f8b6a5b93235ed4db 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: global.scm,v 14.69 2004/10/30 03:56:14 cph Exp $
+$Id: global.scm,v 14.70 2004/10/30 03:58:54 cph Exp $
 
 Copyright 1988,1989,1991,1992,1993,1995 Massachusetts Institute of Technology
 Copyright 1998,2000,2001,2003,2004 Massachusetts Institute of Technology
@@ -426,6 +426,10 @@ USA.
                    prev)
                  alist)))))
 
+(define (hook-in-list? hook-list key)
+  (guarantee-hook-list hook-list 'HOOK-IN-LIST?)
+  (if (assq key (hook-list-hooks hook-list)) #t #f))
+
 (define (run-hooks-in-list hook-list . arguments)
   (guarantee-hook-list hook-list 'RUN-HOOKS-IN-LIST)
   (for-each (lambda (p)
index 7ab4b3f192d58d4656e647a2b7766589ebef1c5c..1c5c9cb660185e4be1c2eb9e61b9afa9f24ed2f1 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: runtime.pkg,v 14.505 2004/10/30 03:56:39 cph Exp $
+$Id: runtime.pkg,v 14.506 2004/10/30 03:59:06 cph Exp $
 
 Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology
 Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology
@@ -293,6 +293,7 @@ USA.
          get-fixed-objects-vector
          get-interrupt-enables
          guarantee-hook-list
+         hook-in-list?
          hook-list?
          hook/exit
          hook/quit