Commits

Anonymous committed aefe3e1

Better handling for end-of-file condition when reading taglibraries

Comments (0)

Files changed (1)

taglibraries.lisp

 	  (*package* (find-package 'cl-user)))
       ;; read tag library
       (use-package :hh-web-tags *package*)
-      (loop 
-	 ;; TODO as a consequence of how this is implemented, any whitespace after last tag 
-	 ;; causes an irrelevant EOF error
-	 while (listen input-stream)
-	 do (eval (with-tag-reader () (read input-stream))))
+      (handler-case (loop 
+		       ;; TODO as a consequence of how this is implemented, any whitespace after last tag 
+		       ;; causes an irrelevant EOF error
+		       while (listen input-stream)
+		       do (eval (with-tag-reader () (read input-stream))))
+	(end-of-file () t))
       ;; expecting an in-tag-library call inside the file
       ;; to set the value of this variable
       *tag-library*))