]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix indentation of Fortran do-loops
authorEli Zaretskii <eliz@gnu.org>
Sat, 14 Sep 2024 14:18:57 +0000 (17:18 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sat, 14 Sep 2024 20:35:00 +0000 (22:35 +0200)
* lisp/progmodes/fortran.el (fortran-calculate-indent): Fix regexp
for do-loops.  Reported by Ken Mankoff <km@kenmankoff.com>.
(Bug#73218)

(cherry picked from commit 98e582e74a2bbc2c7fdef02b8cd90036fa217712)

lisp/progmodes/fortran.el

index 8a726dfe66eaa149c9a5ff7b1dd970501b3987b9..0bd807859c705151f9f14555ea7d8d8f264ca435 100644 (file)
@@ -1631,7 +1631,7 @@ Return point or nil."
                (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_]+ *, *[a-z0-9_]+")
                (setq icol (+ icol fortran-do-indent)))
               ((looking-at
                 "\\(structure\\|union\\|map\\|interface\\)\