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

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

bug#48724: Code collapsing and outline headings for elisp


From: Christopher Dimech
Subject: bug#48724: Code collapsing and outline headings for elisp
Date: Mon, 31 May 2021 01:58:27 +0200

> Sent: Monday, May 31, 2021 at 10:15 AM
> From: "Juri Linkov" <juri@linkov.net>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: 48724@debbugs.gnu.org
> Subject: Re: bug#48724: Code collapsing and outline headings for elisp
>
> > Serious problem is that the two important variables: `outline-regexp' and
> > `outline-heading-alist' are not customizable by using "M-x customize-group".
> >
> > Additionally both of them should be customizable per mode.  Don't you think 
> > so?
>
> I think that modes should set `outline-regexp' and `outline-heading-alist'
> according to the constructs of their programming language.  Then users
> don't need to customize these variables.

Quite Right.

> > There has been a discussion today about outline-minor-mode settings for 
> > fortran
> > (both fixed and free form).  Have had a go at using "!" and "!!", but "Hide 
> > Body"
> > did not hide the body.
> >
> > There could be some default headings for fortran when outline-minor-mode is 
> > enabled.
> > One could follow the current setup for emacs-lisp-mode, for fortran.
> >
> > !! for heading level 1
> > !!! for subheading level 2
> > !!!! for subsubheading level 3
>
> I agree it would be nice to set an appropriate value of `outline-regexp'
> and `outline-heading-alist' for fortran-mode in lisp/progmodes/fortran.el.
>
> But the last time I used Fortran was when Fortran had the "C" character
> for comments at the first fixed column on a punched card, and now
> your example uses some new syntax "!" for comments, so sorry, can't help here.
>
> This task would be a nice assignment for the group of students.

There are currently two modes (1) the fixed format fortran (fortran-made) you
describe with "C" character for comments, and (2) the newer free format fortran
with "!" character for comments (f90-mode).

Could use for fortran-mode starting from three CCC as in elisp

CCC Heading
CCCC Subheading
CCCCC SubSubHeading etc

And for f90-mode use the following, starting from three !!! as in elisp

!!! for heading level 1
!!!! for subheading level 2
!!!!! for subsubheading level 3







reply via email to

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