unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* outline-minor-mode for fortran
@ 2021-05-28 17:41 ludvig-faddeev
  2021-05-28 17:50 ` ludvig-faddeev
  2021-05-28 18:23 ` Philip Kaludercic
  0 siblings, 2 replies; 4+ messages in thread
From: ludvig-faddeev @ 2021-05-28 17:41 UTC (permalink / raw)
  To: Help Gnu Emacs

Can one use outline-minor-mode for fortran and what is used to define
headings?




^ permalink raw reply	[flat|nested] 4+ messages in thread

* outline-minor-mode for fortran
  2021-05-28 17:41 outline-minor-mode for fortran ludvig-faddeev
@ 2021-05-28 17:50 ` ludvig-faddeev
  2021-05-28 18:23 ` Philip Kaludercic
  1 sibling, 0 replies; 4+ messages in thread
From: ludvig-faddeev @ 2021-05-28 17:50 UTC (permalink / raw)
  To: Help Gnu Emacs

I would also like to know what I can use with-eval-after-load for fortran code

Is this the way below

with-eval-after-load 'fortran
with-eval-after-load 'f90





> Sent: Saturday, May 29, 2021 at 5:41 AM
> From: ludvig-faddeev@gmx.com
> To: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> Subject: outline-minor-mode for fortran
>
> Can one use outline-minor-mode for fortran and what is used to define
> headings?
>
>
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: outline-minor-mode for fortran
  2021-05-28 17:41 outline-minor-mode for fortran ludvig-faddeev
  2021-05-28 17:50 ` ludvig-faddeev
@ 2021-05-28 18:23 ` Philip Kaludercic
  2021-05-28 18:43   ` ludvig-faddeev
  1 sibling, 1 reply; 4+ messages in thread
From: Philip Kaludercic @ 2021-05-28 18:23 UTC (permalink / raw)
  To: ludvig-faddeev; +Cc: Help Gnu Emacs

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.

-- 
	Philip K.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* outline-minor-mode for fortran
  2021-05-28 18:23 ` Philip Kaludercic
@ 2021-05-28 18:43   ` ludvig-faddeev
  0 siblings, 0 replies; 4+ messages in thread
From: ludvig-faddeev @ 2021-05-28 18:43 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: Help Gnu Emacs



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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-28 18:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-28 17:41 outline-minor-mode for fortran ludvig-faddeev
2021-05-28 17:50 ` ludvig-faddeev
2021-05-28 18:23 ` Philip Kaludercic
2021-05-28 18:43   ` ludvig-faddeev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).