[Closure-devel] Bug in closure-html, when use with *print-case* set to :downcase

Michał Psota michal at lisp.pl
Wed Jun 4 10:34:46 UTC 2014


Hello,

I've noticed that in 2 places strings are not correctly interned when
you load closure-html with *print-case* set to :downcase. To make it
work, I've changed
(intern …) to (intern (string-upcase …)).

Please find patch attached.

Best regards,
Michał Psota
-------------- next part --------------
diff -rupN /tmp/closure-html-2010-09-20/src/parse/sgml-parse.lisp /tmp/closure-html/src/parse/sgml-parse.lisp
--- /tmp/closure-html-2010-09-20/src/parse/sgml-parse.lisp	2010-09-20 00:07:37.000000000 +0200
+++ /tmp/closure-html/src/parse/sgml-parse.lisp	2014-05-20 12:50:01.817148769 +0200
@@ -860,7 +860,7 @@
 
 (let ((kw-pkg (find-package :keyword)))
   (defun kintern (x)
-    (intern x kw-pkg)))
+    (intern (string-upcase x) kw-pkg)))
 
 (defun canon-value (input dtd tag slot value)
   (let* ((attlist (find-element-attlist dtd tag))
diff -rupN /tmp/closure-html-2010-09-20/src/util/clex.lisp /tmp/closure-html/src/util/clex.lisp
--- /tmp/closure-html-2010-09-20/src/util/clex.lisp	2010-09-20 00:07:37.000000000 +0200
+++ /tmp/closure-html/src/util/clex.lisp	2014-05-20 12:53:08.437157801 +0200
@@ -365,7 +365,7 @@
      (mapcar #'(lambda (x y) (setf (cdr x) y))
              starts (ndfsa->dfsa (mapcar #'cdr starts))))
     ;;    (print (number-states starts))
-    `(DEFUN ,(intern (format nil "MAKE-~A-LEXER" name)) (INPUT)
+    `(DEFUN ,(intern (format nil "~:@(MAKE-~A-LEXER~)" name)) (INPUT)
         (LET* ((STARTS ,(loadable-states-form starts))
                (SUB-STATE 'INITIAL)
                (STATE NIL)
@@ -538,7 +538,7 @@
                                (mungle-transitions (state-transitions state))))
                        (mapcar #'cdr starts))
       (format T "~&~D states." n))
-    `(DEFUN ,(intern (format nil "MAKE-~A-LEXER" name)) (INPUT)
+    `(DEFUN ,(intern (format nil "~:@(MAKE-~A-LEXER~)" name)) (INPUT)
         (LET* ((STARTS ,(loadable-states-form starts))
                (SUB-STATE 'INITIAL)
                (STATE NIL)


More information about the closure-devel mailing list