unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: ludvig-faddeev@gmx.com
To: Philip Kaludercic <philipk@posteo.net>
Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: outline-minor-mode for fortran
Date: Fri, 28 May 2021 20:43:09 +0200	[thread overview]
Message-ID: <trinity-d38b9c42-1ea0-4eea-8bfa-addad9882bab-1622227389051@3c-app-mailcom-bs01> (raw)
In-Reply-To: <871r9q7m4y.fsf@icterid>



> 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	other threads:[~2021-05-28 18:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=trinity-d38b9c42-1ea0-4eea-8bfa-addad9882bab-1622227389051@3c-app-mailcom-bs01 \
    --to=ludvig-faddeev@gmx.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=philipk@posteo.net \
    /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.
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).