Discussion:
str and esc inconsistency (suggestion)
Jan Rychter
2009-06-03 09:06:20 UTC
Permalink
I have a suggestion for CL-WHO.

Currently, you can't just replace str with esc in your code, because
while str does a princ, esc expects a string. I have code that passes
numbers to str and wanted to do a wholesale replacement.

The manual says:

str: Forms that look like (str form1 form*) will be substituted with (let
((result form1)) (when result (princ result s)))

esc: Forms that look like (esc form1 form*) will be substituted with (let
((result form1)) (when result (write-string (escape-string result s)))).

I would suggest improving esc by performing a princ if the first
argument is not a string.

--J.
Edi Weitz
2009-06-03 10:31:32 UTC
Permalink
Sounds good. Please send a patch against the dev version at bknr.net
and I'll integrate this.

http://bknr.net/trac/browser/trunk/thirdparty/cl-who
http://weitz.de/patches.html

Thanks,
Edi.
Post by Jan Rychter
I have a suggestion for CL-WHO.
Currently, you can't just replace str with esc in your code, because
while str does a princ, esc expects a string. I have code that passes
numbers to str and wanted to do a wholesale replacement.
str: Forms that look like (str form1 form*) will be substituted with (let
((result form1)) (when result (princ result s)))
esc: Forms that look like (esc form1 form*) will be substituted with (let
((result form1)) (when result (write-string (escape-string result s)))).
I would suggest improving esc by performing a princ if the first
argument is not a string.
--J.
_______________________________________________
cl-who-devel site list
http://common-lisp.net/mailman/listinfo/cl-who-devel
Loading...