[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How can use outline mode in lisp code?
From: |
Thien-Thi Nguyen |
Subject: |
Re: How can use outline mode in lisp code? |
Date: |
24 Jun 2004 11:50:11 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
Giannandrea Castaldi <g.castal@tiscali.it> writes:
> I'm using emacs+slime to write common lisp programs (cmucl).
> I'd like to use the outline mode while I'm editing lisp
> programs. It should make invisble/visble the symbolic
> expressions of my files. How can I do it?
i recommend hideshow minor mode because it can handle hiding the
binding block in a let form, whereas outline cannot. it is also
"block" oriented rather than simply indentation detecting, and
thus handles nested forms better (which is nice for sexp-based
languages (like lisp :-)). for example, given the form (J and K
signify cursor positions on the line below them):
J KL
(let ((a (list 10
20
30))
(b 2)
(c 3))
(list a b c))
hs-hide-block at J shows:
(let ((a (list 10...
hs-hide-block at K shows:
(let ((a (list 10...
(list a b c))
hs-hide-block at L shows:
(let ((a (list 10...
(b 2)
(c 3))
(list a b c))
there are also other facilities i won't spew on about here (see
Commentary in hideshow.el for more info).
the bad news is that currently top-level comments and "internal"
comments are handled differently. someone needs to generalize
hideshow algorithms so that the former can be implemented as a
special case of the properly-recursive latter. a bug report to
this effect has been sitting for six months, and will probably sit
for another few, until autumn, at least. some programmers are at
times extremely slow. :-/
thi