> From: Ken Mankoff <k...@kenmankoff.com>
> Date: Thu, 12 Sep 2024 11:44:44 -0700
> 
> Following up from 
> https://lists.gnu.org/archive/html/emacs-devel/2024-08/msg00904.html I'm 
> submitting a patch to fix Fortran indentation due to an overly aggressive 
> match for do loops.

Thanks.

> --- a/lisp/progmodes/fortran.el
> +++ b/lisp/progmodes/fortran.el
> @@ -1631,7 +1631,7 @@ fortran-calculate-indent
>                 (setq icol (+ icol fortran-if-indent)))
>                ((looking-at "where[ \t]*(.*)[ \t]*\n")
>                 (setq icol (+ icol fortran-if-indent)))
> -              ((looking-at "do\\b")
> +              ((looking-at "do[\\ |0-9]+.*=[\\ a-z0-9_]*,[\\ a-z0-9_]*")

What do you intend with the likes of "[\\ |0-9]+" ?  Is this a
character alternative, or is that an alternative of matches?  If the
former, there's no need to escape a backslash, but then why is '|'
there?

IOW, can you please describe in plain English what did you intend this
regexp to match?

Thanks.



Reply via email to