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

Indented Strings

KMP has recently proposed (I don't think this went out to the whole
list) that instead of having #"..." be a back door into format, it
should do an auto-fill on the string at readtime, removing any
whitespace following a newline.  Presumably the auto-fill would need to
look at global variables (defaulted by each implementation) to determine
what the fill-column, word-separators, and newline sequence ought to be.

This is getting closer to what we really want for documentation strings,
I think, and it is definitely better than having ~% all over the place.
In fact, such an auto-fill function seems to me like something we might
want to build into the language as a function -- it is at least as
useful as STRING-CAPITALIZE.  In addition to documentation strings, it
would be useful in error messages and for all sorts of interactive
user-prompting stuff.  It is very hard for someone writing portable code
on a Lisp machine to have stuff come out looking nice on a 24x80 screen
-- runtime formatting would help a lot.  We want to keep this fairly
simple, though, and not reinvent Scribe or TEX.

I am still not sure that we want to use #"..." as shorthand for this.
For many uses of the auto-fill function, readtime/compile-time is the
wrong time to do the filling.  What if we just create this new function,
and then state that all documentation strings are run through
STRING-FILL (or whatever) either when they are stashed away or when
printed by DESCRIBE.

-- Scott