help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Collapse all include lines?


From: Eli Zaretskii
Subject: Re: Collapse all include lines?
Date: Sun, 15 May 2022 08:13:22 +0300

> From: John Yates <john@yates-sheets.org>
> Date: Sat, 14 May 2022 16:17:16 -0400
> Cc: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
> 
> On Sat, May 14, 2022 at 2:21 AM Eli Zaretskii <eliz@gnu.org> wrote:
> >
> > Did you look at hideif.el?
> 
> No I did not.  But now that I have, it is largely what
> I recall and does not seem to meet my needs.
> 
> hideif is focussed on understanding preprocessor
> #if constructs and their attendant expressions.
> 
> My need is much simpler.  I simply want to identify
> a run of #include lines with potentially interleaved
> blank (and maybe comment?) lines.  When I open
> a file I would like all those lines hidden.  On rather
> rare occasions I may need to expose those lines.
> But, by and large, I do not want to see them

Is it conceivable to wrap those #include lines by something like

  #ifndef DON'T_WANT_TO_SEE
  ...
  #endif

?  If so, you could then teach hideif.el to hide this block.

Another possibility (100% unexplored) is to define a jit-lock function
which will put the 'invisible' property on such a block (assuming it
can be easily identified).



reply via email to

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