[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: hideshow docstring in elisp or common lisp code
From: |
Drew Adams |
Subject: |
RE: hideshow docstring in elisp or common lisp code |
Date: |
Mon, 12 Nov 2018 19:34:05 -0800 (PST) |
> 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