[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: format ~t - the bug remains

Sam Steingold <sshteingold@cctrading.com> wrote:

>     Sometimes I get a feeling that I am the only subscriber to this list 
>     (definitely the most garrulous!)... Oh well. :-)

But then, you still don't post as often as I do :-)

>      The same bug that was (allegedly) fixed recently: clisp thinks that 
>      the first output after the command starts with column 2, not 0. The 
>      following is the test case:
>      > (sorted-map ...)
>       --> a: a;        b: a;               c: a
>       --> a: d;          b: nil;             c: nil
>       --> a: nil;        b: g;               c: g
>       --> a: i;          b: i;               c: i
>       --> a: nil;        b: nil;             c: l

This bug is fixed on Win32 with console I/O. I cannot fix it when I/O
is redirected to Emacs, because this situation looks - from clisp's
perspective - exactly as a double pipe "... | clisp | ...". CLISP
cannot know that Emacs arranges things so that when you type Return
on the input side, the output side's column will move to column 0.
You would have to tell CLISP explicitly about it, somewhat like this:

   (when (= (sys::%record-length *terminal-io*) 10)
     (setf (sys::%record-ref *terminal-io* 7) 'equal)

>      BTW, is there a way to get a function's signature? (the list of 
>      arguments)

Something like

  (defun function-arglist (fn)
        (multiple-value-call #'sys::describe-signature nil
                             (sys::function-signature fn)
  ) ) ) )

will probably do the trick. </HACK> Of course, keep in mind that
CLISP internals (i.e. everything you get access to through the SYSTEM
package) are subject to change without notice.