[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Arbitrary folding in emacs
From: |
Nicolas Richard |
Subject: |
Re: Arbitrary folding in emacs |
Date: |
Sun, 30 Mar 2014 12:19:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> But obviously, it'll be a bit crude (e.g. no commands to unhide, tho you
> might be able to use reveal-mode for that).
Here's a "toggling" version :
(defun my-toggle-hide-region (beg end)
"Hide region. Unless it contains already hidden text, then show it."
(interactive "r")
(let ((has-invisible-p
(catch 'invisible
(dolist (ov (overlays-in beg end))
(when (eq 'outline (overlay-get ov 'invisible))
(throw 'invisible t))))))
(outline-flag-region beg end (not has-invisible-p))))
--
Nico.
- Arbitrary folding in emacs, C K Kashyap, 2014/03/28
- Re: Arbitrary folding in emacs, Eli Zaretskii, 2014/03/28
- Re: Arbitrary folding in emacs, C K Kashyap, 2014/03/28
- Re: Arbitrary folding in emacs, Eli Zaretskii, 2014/03/28
- Re: Arbitrary folding in emacs, C K Kashyap, 2014/03/28
- Re: Arbitrary folding in emacs, Tim Visher, 2014/03/28
- Re: Arbitrary folding in emacs, Nicolas Richard, 2014/03/28
- Re: Arbitrary folding in emacs, Stefan Monnier, 2014/03/28
- Re: Arbitrary folding in emacs,
Nicolas Richard <=
- Re: Arbitrary folding in emacs, Tassilo Horn, 2014/03/28
- Re: Arbitrary folding in emacs, Jai Dayal, 2014/03/28
- Re: Arbitrary folding in emacs, Jarek Czekalski, 2014/03/29
- Re: Arbitrary folding in emacs, Marcin Borkowski, 2014/03/29
- Re: Arbitrary folding in emacs, Tim Visher, 2014/03/31
Re: Arbitrary folding in emacs, Thien-Thi Nguyen, 2014/03/28
Re: Arbitrary folding in emacs, Andreas Röhler, 2014/03/31