[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Hiding text in a fred-window (Responses)
- To: info-macl@cambridge.apple.com
- Subject: Hiding text in a fred-window (Responses)
- From: Josh Lubell <lubell@cs.UMD.EDU>
- Date: Thu, 02 May 91 13:43:36 -0400
I posted an earlier message asking how implement a fred-window with a
user option to either display or hide certain text. Here are the
responses I got:
From: Andrew L. M. Shalit <alms@cambridge.apple.com>
You could:
keep two different buffers, one with the text and one without, and
switch which buffer is displayed in the window.
or
make a font which has characters with no width (i.e. they don't
display as anything). You can then toggle the delimeter font between
:bold and invisible by calling BUFFER-REPLACE-FONT-SPEC.
Caveat: I don't know if either of these will work.
-andrew
From: mkatz@garnet.berkeley.edu (Michael Katz)
Well, there's no magic way to have "invisible" characters in a FRED window,
as far as I know.
It sounds to me like you should just have a parse tree structure containing
the partial user code, where the leaves are the user text. Think of that
as the deep structure and the FRED window as just the superficial structure
that gets updated a lot.
We've been working on a similar project where the user can hide any subset of
the comments in a Lisp file, and then reshow them. We just associate a big
list with each FRED window. The MARKs used in FRED make this very convenient:
you just keep a mark at teach location where the hidden comments go, and you
know where to put them back.
Michael
Thanks to both of you for your help!! I think I'm going to go with
Michael's idea of having an internal representation for what is
displayed in the fred-window.
Josh