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

Ignoring control-F's in Lisp source files

    Date: Mon, 19 Sep 88 17:26 EDT
    From: Charles Rich <rich@wheaties.ai.mit.edu>

    Has anyone written, or know of, an appropriate Common Lisp readtable
    definition that will ignore font change characters in a Lisp source file?
    For example the Symbolics Styled-Lisp facility inserts a lot
    of font changes.  Note that the control-F can be followed not only by
    a single character, but sometimes by a list or other complex expression.


    P.S. To Symbolics:  What exactly can follow a control-F?  Also, it
    wouldn't be a bad idea for Symbolics to provide such a Common Lisp
    readtable definition to enhance portability of code written on Lispms.

    P.P.S. If we had such a facility, it would be a useful site customization,
    as it would assist using the same Common Lisp source files in both

I don't have such a readtable, but here is the information you need to
implement it.  c-F can be followed by one of three things:

- A decimal digit.  Indicates that the specified font number should be

- A Lisp list.  If it is one element long, the first element is a font
number to select (an extension of the first case, when more than 10
fonts are used).  If it is five elements long, the cdr is a description
of a font and style, the car is a number to assign to that font, and the
font is selected.

- The string "â??ED,#TD1Psâ??â??Tâ??B[Begin using 006 escapes]".
Control-â?? >-------------|

This last type is usually found once per file, and indicates that other
c-F sequences may be found later.  The seemingly random sequence of
characters before the "[" is called the password, and is intended to be
unlikely to be found in non-Symbolics files, so that it can be pretty
sure that c-F's are supposed to be font-change characters.

I think pre-Genera 7.0 files also allowed c-F to be followed by "*",
which popped the font stack.