+1998-12-01 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * boot-9.scm (*suppress-old-style-hook-warning*): Set this to #t
+ if you don't want the old style hook warnings.
+
1998-12-01 Christian Lynbech <chl@tbit.dk>
* boot-9.scm (try-using-libtool-name): Fix check on dlname to make
(run-hook hook)
(for-each (lambda (thunk) (thunk)) hook)))
+(define *suppress-old-style-hook-warning* #f)
+
(define add-hook!
(procedure->memoizing-macro
(lambda (exp env)
(if (and (pair? hook) (eq? (car hook) 'hook))
`(new-add-hook! ,@(cdr exp))
(begin
- (display "Warning: Old style hooks\n" (current-error-port))
+ (or *suppress-old-style-hook-warning*
+ (display "Warning: Old style hooks\n" (current-error-port)))
`(let ((thunk ,(caddr exp)))
(if (not (memq thunk ,(cadr exp)))
(set! ,(cadr exp)
(if (and (pair? hook) (eq? (car hook) 'hook))
`(new-remove-hook! ,@(cdr exp))
(begin
- (display "Warning: Old style hooks\n" (current-error-port))
+ (or *suppress-old-style-hook-warning*
+ (display "Warning: Old style hooks\n" (current-error-port)))
`(let ((thunk ,(caddr exp)))
(set! ,(cadr exp)
(delq! thunk ,(cadr exp))))))))))