unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Mirko Vukovic <mirko.vukovic@gmail.com>, help-gnu-emacs@gnu.org
Subject: RE: hideshow docstring in elisp or common lisp code
Date: Mon, 12 Nov 2018 19:34:05 -0800 (PST)	[thread overview]
Message-ID: <e30dedf4-7fc5-4b11-bf68-7586f3e23bae@default> (raw)
In-Reply-To: <CAO73BAD22bUS0injJVa875ZBHWaTPkRar+_+87msKR=-a_6MHw@mail.gmail.com>

> I would like to hide/show docstrings of my common lisp
> code.  Has that been defined in some hideshow package?
> If not I'll give it a shot, initially for defuns.

This is all you need to do, but you need these 3 libraries:
`zones.el', `highlight.el', `isearch-prop.el'.

1. Create zones of all of the doc strings, fontifying
   the full buffer.

   `M-x zz-create-face-zones font-lock-doc-face'

2. Toggle invisibility of the zones.

   `M-x isearchp-toggle-zones-invisible'

Step 1 fontifies the full buffer, then creates a
sequence of non-overlapping buffer zones for the
doc strings. Step 2 makes the zones invisible.
Use the same toggle command, to make them visible.

I defined this stuff for Elisp code, but I imagine
it works also for Common Lisp code.

You can get all 3 libraries from Emacs Wiki.

After the latest version of `zones.el' gets added
to GNU ELPA (soon, I think) you can get it (but not
the others) also from GNU ELPA.

https://www.emacswiki.org/emacs?action=elisp-area;context=0



  parent reply	other threads:[~2018-11-13  3:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05 22:33 hideshow docstring in elisp or common lisp code Mirko Vukovic
2018-11-09  2:12 ` Michael Heerdegen
2018-11-11  9:03   ` Andreas Röhler
2018-11-13  3:34 ` Drew Adams [this message]
2018-11-13 15:11   ` Drew Adams
     [not found] <mailman.3529.1541470097.1284.help-gnu-emacs@gnu.org>
2018-11-06 19:05 ` Emanuel Berg
2018-11-08 13:57   ` Mirko

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=e30dedf4-7fc5-4b11-bf68-7586f3e23bae@default \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=mirko.vukovic@gmail.com \
    /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).