unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Thien-Thi Nguyen <ttn@glug.org>
Subject: Re: How can use outline mode in lisp code?
Date: 24 Jun 2004 11:50:11 +0200	[thread overview]
Message-ID: <7e3c4lmgj0.fsf@ada2.unipv.it> (raw)
In-Reply-To: cbdtts$tj1$1@lacerta.tiscalinet.it

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

  reply	other threads:[~2004-06-24  9:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-24  6:56 How can use outline mode in lisp code? Giannandrea Castaldi
2004-06-24  9:50 ` Thien-Thi Nguyen [this message]
2004-06-24 11:33   ` Giannandrea Castaldi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7e3c4lmgj0.fsf@ada2.unipv.it \
    --to=ttn@glug.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).