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

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

outline-minor-mode for fortran


From: ludvig-faddeev
Subject: outline-minor-mode for fortran
Date: Fri, 28 May 2021 20:43:09 +0200


> Sent: Saturday, May 29, 2021 at 6:23 AM
> From: "Philip Kaludercic" <philipk@posteo.net>
> To: ludvig-faddeev@gmx.com
> Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> Subject: Re: outline-minor-mode for fortran
>
> ludvig-faddeev@gmx.com writes:
>
> > Can one use outline-minor-mode for fortran and what is used to define
> > headings?
>
> I have never really used fortran-mode, but would this work
>
>         (add-hook 'fortran-mode-hook
>                   (lambda ()
>                     (setq-local outline-regexp fortran-start-prog-re)))
>
> Basically every line that starts with "program", "subroutine, etc. is
> seen as a outline-header.

Have had a go at applying your suggestion with both "fortran" and "f90"
as follows

(add-hook 'fortran-mode-hook
          (lambda ()
            (setq-local outline-regexp fortran-start-prog-re)))

(add-hook 'f90-mode-hook
          (lambda ()
            (setq-local outline-regexp f90-start-prog-re)))

Then hit "Hide Body" and the headings are not being hidden yet.


> --
>       Philip K.
>



reply via email to

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