[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [reveal-mode] Hiding short expressions

From: Stefan
Subject: Re: [reveal-mode] Hiding short expressions
Date: 02 Jul 2004 17:37:55 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> currently I am trying to make use of reveal-mode for hiding and
> revealing \footnote{...} expressions in Emacs.  Now the problem is
> that visible expressions under the control of reveal-mode only get
> hidden if the cursor moves before the beginning of the line with the
> expression or past its end.  If you have short expressions within a
> line it would be nice if the expression became invisible as soon as
> the cursor moves out of it.

> Are there any reasons why this is not handled like this in reveal.el
> and would it be possible to change it if there aren't any?  (A patch
> would be to replace the `save-excursion' statements around line 119 in
> reveal.el by the `overlay-start' or `overlay-end' statements already
> defined there.)

The current behavior of reveal-mode was designed while using it with
outline-minor-mode in elisp buffers.  It is tuned for such a context and
might indeed need different tuning in a different context.

The behavior you seem to want is actually simpler than the current
behavior (in other words, I first implemented the behavior you want and
then added code to keep the overlays open even after the cursor moves out
of the overlay), and it should be easy to change the code such that you can
choose between different behaviors.

But please don't just remove the code that implements the current behavior.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]