> * Bruno Haible <oehab@...> [2004-10-21 13:28:35 +0200]:
> This is superb!
> Instead of being tied to a particular indentation style, I
> can define one myself: Just added
> (setq *fill-indent-sexp* #'(lambda (x) (declare (compile)) (+ x 2)))
> to my .clisprc.lisp. Marvellous!
so you don't like the default #'1+ style?!
I should have kept it NIL! :-)
> The only nit is that sometimes the right margin is exceeded: In an
> 80-column wide xterm I get
right margin is computed in STREAM-START-S-EXPRESSION as
(- (right-margin) (fill-stream-sexp-indent stream))
> $ CLISP_LANGUAGE=english ./lisp.run -B . -N locale -Efile UTF-8 -Eterminal UTF-8 -norc -m 1800KW -M halfcompiled.mem -q -c gray.lisp
> WARNING: *FOREIGN-ENCODING*: reset to ASCII
> ;; Compiling file /home/haible/clisp-cvs/clisp/build/gray.lisp ...
> WARNING: Replacing method
> #<STANDARD-METHOD (#<STANDARD-CLASS CLASS> (EQL #<BUILT-IN-CLASS STREAM>))>
> in #<STANDARD-GENERIC-FUNCTION VALIDATE-SUPERCLASS>
$ ./clisp -q -norc -d -c gray.lisp
;; Compiling file /cygdrive/d/gnu/clisp/current/build-O/gray.lisp ...
WARNING: Replacing method
(#<STANDARD-CLASS CLASS> (EQL #<BUILT-IN-CLASS STREAM>))>
in #<STANDARD-GENERIC-FUNCTION VALIDATE-SUPERCLASS>
;; Wrote file /cygdrive/d/gnu/clisp/current/build-O/gray.fas
0 errors, 0 warnings
> So it seems there's still a nit somewhere in the computation of the
> available width.
I am sure there is :-(
When the pretty-printer is fixed, we will need to revisit fill-out.lisp
- and maybe switch to using *PRIN-INDENTATION* - anyway, so, unless
there is a reproducible test case, I will not look into this for now.
 the first version used *PRIN-INDENTATION*, but it required too much
case 1 : SEXP in-line: needs _no_ indentation
but: *PRIN-INDENTATION* produces an indented string (and the
indentation has to be stripped because it is not needed!)
case 2 : 1-line SEXP on its own line: needs indentation, no
but: *PRIN-INDENTATION* produces an indented string (but the
indentation has to be stripped anyway so that we can
distinguish between this case and the previous one)
case 3 : multi-line SEXP in its own block: needs indentation on all
lines, starts with a newline
but: *PRIN-INDENTATION* indents all lines except for the first
one, so it has to be indented by hand anyway!
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
I want Tamagochi! -- What for? Your pet hamster is still alive!