[slime-devel] Autodoc-arglist display (extract-cursor-marker), Lispworks.
Tobias C. Rittweiler
tcr at freebits.de
Wed Jan 6 14:52:09 UTC 2010
Johannes Grødem <johs at netfonds.no> writes:
> * Tobias C. Rittweiler:
>>> (loop for (car . cdr) on form ...) when form is a symbol will simply
>>> loop over no items in SBCL, CLISP, etc, but will signal an error in
>>> Lispworks.
>> [...]
>> What was the form that caused autodoc to result in such an error?
>
> Here's a trace of autodoc when I type "(car" in the REPL.
>
> 0 SWANK:AUTODOC > ...
> >> SWANK::RAW-FORM : ("car" SWANK::%CURSOR-MARKER%)
> >> SWANK::PRINT-RIGHT-MARGIN : 108
> >> SWANK::PRINT-LINES : NIL
> 0 SWANK:AUTODOC < ...
Thanks that should be fixed now.
> > PS.
> > In order to test autodoc, you can do
> > M-x slime-run-one-test RET autodoc.1 RET
>
> Ok, thanks. There are some errors for Lispworks, but they seem to be
> unrelated.
> * autodoc.1
...
> ** input: ((swank::with-retry-restart (:msg *HERE* (with-retry-restart (&key ===> (msg "Retry.") <===) &body body))
> OK: At the top level (no debugging or pending RPCs)
> FAILED: Autodoc in `(swank::with-retry-restart (:msg ' (at 34) is as expected:
> expected: ["(with-retry-restart (&key ===> (msg \"Retry.\") <===) &body body)"]
> actual: ["(with-retry-restart (&key ===> (msg |Retry.|) <===) &body body)"]
> FAILED: Autodoc in `(swank::with-retry-restart (:msg )' (at 34) is as expected:
> expected: ["(with-retry-restart (&key ===> (msg \"Retry.\") <===) &body body)"]
> actual: ["(with-retry-restart (&key ===> (msg |Retry.|) <===) &body
> body)"]
Ok these fail because ARGLIST calls REPLACE-STRINGS-WITH-SYMBOLS in
Lispworks swank-backend -- and that function turns the "Retry." initform
into a symbol.
That kind of hackery was needed because Lispworks used to return
arglist-information in stringified CLHS-style EBNF syntax (iirc on,
e.g. FLET) -- hopefully that was fixed in the new Lispworks6.
Perhaps patches are available for Lispworks <6, too?
Anyway, the way REPLACE-STRINGS-WITH-SYMBOLS operates seems rather
kludgy.
I'd prefer if we could get rid of it, install some check, and point
people to hopefully available patches.
> ** input: ((swank::start-server "/tmp/foo" :coding-system *HERE* (start-server port-file &key (style swank:*communication-style*) (dont-close swank:*dont-close*) ===> (coding-system swank::*coding-system*) <===))
> OK: At the top level (no debugging or pending RPCs)
> FAILED: Autodoc in `(swank::start-server "/tmp/foo" :coding-system ' (at 48) is as expected:
> expected: ["(start-server port-file &key (style swank:*communication-style*) (dont-close swank:*dont-close*) ===> (coding-system swank::*coding-system*) <===)"]
> actual: ["(start-server port-file &key (style swank:*communication-style*) (dont-close swank:*dont-close*)
> ===> (coding-system swank::*coding-system*) <===)"]
> FAILED: Autodoc in `(swank::start-server "/tmp/foo" :coding-system )' (at 48) is as expected:
> expected: ["(start-server port-file &key (style swank:*communication-style*) (dont-close swank:*dont-close*) ===> (coding-system swank::*coding-system*) <===)"]
> actual: ["(start-server port-file &key (style swank:*communication-style*) (dont-close swank:*dont-close*)
> ===> (coding-system swank::*coding-system*) <===)"]
Ok, here a newline was added. Did you set
`slime-autodoc-use-multiline-p' to T?
The test should probably bind that to NIL during the test. I'll do just
that.
-T.
More information about the slime-devel
mailing list