all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Collapse all include lines?
Date: Sun, 15 May 2022 08:13:22 +0300	[thread overview]
Message-ID: <834k1rl6od.fsf@gnu.org> (raw)
In-Reply-To: <CAJnXXoizHn5+gFd6f+tLSA=YvaWkGqqnZsSoM45OEa=DXs-pqQ@mail.gmail.com> (message from John Yates on Sat, 14 May 2022 16:17:16 -0400)

> 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).



  parent reply	other threads:[~2022-05-15  5:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13 22:28 Collapse all include lines? John Yates
2022-05-13 22:36 ` Emanuel Berg
2022-05-14  6:21 ` Eli Zaretskii
2022-05-14 20:17   ` John Yates
2022-05-14 21:53     ` Emanuel Berg
2022-05-15  5:13     ` Eli Zaretskii [this message]
2022-05-15 14:39       ` Emanuel Berg
2022-05-15 21:05       ` John Yates
2022-05-15 21:29         ` Emanuel Berg
2022-05-15 21:41           ` Emanuel Berg
2022-05-15 21:07       ` John Yates
2022-05-15 22:30 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-05-16  0:37   ` Emanuel Berg

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=834k1rl6od.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.