Hi Alex,

Hi Jon,

 > That was a quick fix! Thanks.

Yes, because you triggered it finally :-) A few days ago, Henrik also
stubled across this bug, and something had to be done about it.

Having a '#' in an argument to 'str' is something not really intended.

'str' parses formally valid Lisp expression, and it is probably not a
good idea to use it to parse arbitrary data (as Henrik tried with HTML

It employs the full machinery of the reader, and this can have
unexpected side effects. For example, read-macro characters like
backquote, tilde or comma will cause the evaluation of following


I used 'str' when reading .l files to check my own and your use of '(if x y)' vs. '(when x y)', but I did experience some strange behaviour ;-), so I probably should use something else than 'str' for this. Here's my little checker:

# Checking a function/structure already in memory
(de ifwarn (Prg)
        (when (lst? Prg)
                (when (and (= (car Prg) 'if) (<> (length Prg) 4))
                        (println Prg) )
                (mapcar ifwarn Prg)
                NIL) )

# Checking a file (.l or other)
(de ifwarnfile (Path)
        (in Path (ifwarn (str (till NIL T)))) )

# Checking all .l files in a directory
(de ifwarndir (Path)
        (if (=T (car (info Path)))
                (chdir Path
                        (prinl (pwd))
                        (for F (dir)
                                (ifwarndir F) ) )
                (when (tail '(. l) (chop Path))
                        (prinl Path)
                        (ifwarnfile Path) ) ) )


Reply via email to