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

[no subject]

RG was screwed for hours today because he had Q backspac Q
in his file and it looked like just a Q.  It took a long time
to track down what was going on.

I wonder whether there is any reason to allow overprinting
in the middle of Lisp code.  Perhaps a backspace character
not inside a comment, string or vertical bars should be an
error in READ.

If we do want to allow overprinting in symbols in a program,
then we should clean it up.  We could have canonicalization
a la Multics.  This could be done by READ, or the editor
could maintain all data in canonical form.  The former is
probably the easiest, since READ has to scan all the characters
anyway and could have arbitrary hair tacked onto the backspace
character without slowing the normal case.  Backspaceing
past the end of a symbol or past the beginning would still
be screws which ought to be detected as errors.

The cleanest solution of all is to make ZWEI keep all text
in canonical form all the time.  The commands that operate
on characters would have to move over an entire sequence
of overstriking as one character.  There is an easy way to do
this: choose a character to represent "a bunch of overstrikes".
With each line that contains overstrikes, keep a list
(on the line's plist) associating buffer pointers with lists
of characters to overstrike.  Each buffer pointer points
at a "bunch of overstruck chars" character.  When TV-LINE-OUT
sees a "bunch of overstruck chars" character, it refers to
the list of buffer pointers to see what to print.
All editing commands automatically treat the overstrike
as a single character.  There might want to be a special
hack for the word and list commands to decide on the
syntax of the overstrike based on what was overstruck,
but aside from these and the Backspace command to create an
overstrike, no editing functions would need to know about them.

the only lossage is that reading in a file has to find these
overstrikes and convert them.  This would be slow.  So, we
create a file property saying whether there is overstriking.
If there isn't, then backspace displays like <backspace>,
not as overstriking.  If there is, then scan for overstrikes
when reading the file in.  The Backspace command to create
an overstrike could require that the file property be set.