[Lisppaste-cvs] CVS update: lisppaste2/clhs-lookup.lisp

Brian Mastenbrook bmastenbrook at common-lisp.net
Thu Jun 17 12:59:17 UTC 2004


Update of /project/lisppaste/cvsroot/lisppaste2
In directory common-lisp.net:/tmp/cvs-serv13571

Modified Files:
	clhs-lookup.lisp 
Log Message:
Slightly less aggressive warning behavior

Date: Thu Jun 17 05:59:17 2004
Author: bmastenbrook

Index: lisppaste2/clhs-lookup.lisp
diff -u lisppaste2/clhs-lookup.lisp:1.5 lisppaste2/clhs-lookup.lisp:1.6
--- lisppaste2/clhs-lookup.lisp:1.5	Thu Jun 17 05:53:17 2004
+++ lisppaste2/clhs-lookup.lisp	Thu Jun 17 05:59:17 2004
@@ -30,6 +30,8 @@
 (defun valid-target (&rest numbers)
   (probe-file (format nil "Body/~2,'0d_~(~{~36r~}~).htm" (car numbers) (mapcar #'(lambda (x) (+ x 9)) (cdr numbers)))))
 
+(defvar *last-warn-time* 0)
+
 (defun populate-table ()
   (unless *populated-p*
     ;; Hyperspec
@@ -37,7 +39,9 @@
       ;; populate the table with the symbols from the Map file
       ;; this bit is easy and portable.
       (unless s
-        (format *trace-output* "Warning: could not find hyperspec map file. Adjust the path at the top of clhs-lookup.lisp to get links to the HyperSpec.~%")
+        (when (> (- (get-universal-time) *last-warn-time*) 10)
+          (format *trace-output* "Warning: could not find hyperspec map file. Adjust the path at the top of clhs-lookup.lisp to get links to the HyperSpec.~%")
+          (setf *last-warn-time* (get-universal-time)))
         (return-from populate-table nil))
       (do ((symbol-name (read-line s nil s) (read-line s nil s))
            (url (read-line s nil s) (read-line s nil s)))





More information about the Lisppaste-cvs mailing list