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

Ellipsis mode for zmacs?



    Date: Tue, 25 Jun 1991 19:05 EDT
    From: rsl@MAX-FLEISCHER.SF.Dialnet.ILA.COM (Richard Lamson)

	Date: Tue, 25 Jun 91 12:30:47 -0600
	From: drstrip@cs.sandia.gov (David R. Strip)

	(sorry if this is a repost, seems to have gotten lost
	as far as I can tell)
	Is there some sort of ellipsis mode for zmacs? By that I mean
	a way of marking sections of buffer to be hidden (perhaps
	recursively). It would be great for outlining, code writing, etc.

    I assume so, because Concordia uses it.  I don't know anything about how
    you actually build buffers which can do this, though.

I think this is the "disconnected sections" stuff that appeared in Zwei
a few releases ago.

Unfortunately, there don't appear to be any uses of this in the standard
system, so there are no source examples to look at.  From what I can
tell, the way you do this is to define a buffer flavor that implements the
following messages:

:UNLINKED-SECTIONS-P () - returns non-NIL
:BUFFER-NEXT-UNLINKED-LINE (BUFFER LINE) - LINE will always be the last
line of a section, and this should return the first line of the next
section, or NIL if LINE was the last line of the last section.
:BUFFER-PREVIOUS-UNLINKED-LINE (BUFFER LINE) - analogous for the other
direction.

You'd also probably need to implement a whopper for :SAVE to expand all
the ellipses before writing the buffer out.

                                                barmar