Use WITH-NOTIFICATION to notify of initialization and finalization of
authorTaylor R. Campbell <net/mumble/campbell>
Wed, 4 Apr 2007 18:35:16 +0000 (18:35 +0000)
committerTaylor R. Campbell <net/mumble/campbell>
Wed, 4 Apr 2007 18:35:16 +0000 (18:35 +0000)
packages, rather than formatting the message to the notification
output port directly.

v7/src/runtime/packag.scm

index c1b58a9885844c4eb72fe4f4990acd6501282cc0..c83efaec3b17a0d93a6a902ac95e10daba982ba8 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: packag.scm,v 14.51 2007/04/04 05:08:19 riastradh Exp $
+$Id: packag.scm,v 14.52 2007/04/04 18:35:16 riastradh Exp $
 
 Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
     1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
@@ -525,16 +525,13 @@ USA.
     (lambda (description)
       (let ((expressions (selector description)))
        (if (fix:> (vector-length expressions) 0)
-           (let ((name (load-description/name description))
-                 (port (notification-output-port)))
-             (fresh-line port)
-             (write-string ";" port)
-             (write-string verb port)
-             (write-string " package " port)
-             (write name port)
-             (for-each-vector-element expressions
-               (let ((environment (find-package-environment name)))
-                 (lambda (expression)
-                   (eval expression environment))))
-             (write-string " -- done" port)
-             (newline port)))))))
\ No newline at end of file
+           (let ((name (load-description/name description)))
+             (with-notification (lambda (port)
+                                  (write-string verb port)
+                                  (write-string " package " port)
+                                  (write name port))
+               (lambda ()
+                 (for-each-vector-element expressions
+                   (let ((environment (find-package-environment name)))
+                     (lambda (expression)
+                       (eval expression environment))))))))))))
\ No newline at end of file