From 180e442ef2b0e94acc1b9c07aade6da8f2ab3c9e Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 30 Oct 2004 03:59:06 +0000 Subject: [PATCH] Add HOOK-IN-LIST?. --- v7/src/runtime/global.scm | 6 +++++- v7/src/runtime/runtime.pkg | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/v7/src/runtime/global.scm b/v7/src/runtime/global.scm index 284664c6a..2e1ed9b56 100644 --- a/v7/src/runtime/global.scm +++ b/v7/src/runtime/global.scm @@ -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) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 7ab4b3f19..1c5c9cb66 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -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 -- 2.25.1