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: Emanuel Berg
Subject: Re: Collapse all include lines?
Date: Mon, 16 May 2022 02:37:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Monnier via Users list for the GNU Emacs text editor wrote:

> Use `elide-head`. It's designed to hide the copyright blurb,
> but I think the regexp should be easy to adjust to match
> those includes as well.

Indeed, this

(require 'elide-head)

(setq elide-head-headers-to-hide
      `(("#include <" . "stdio.h>")
        ,@elide-head-headers-to-hide) )

and then M-x elide-head RET hides

  #include <stdio.h>

in this [1] file,

and C-u M-x elide-head RET will show it again.

I'll leave the regexp work to the OP tho ...

[1] https://dataswamp.org/~incal/emacs-init/more/dm/dm.c

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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