[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Hiding text in a fred-window (Responses)
- To: email@example.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 <firstname.lastname@example.org>
keep two different buffers, one with the text and one without, and
switch which buffer is displayed in the window.
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.
From: email@example.com (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.
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.