unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#73218: [PATCH] Fix Fortran indent below do_not_a_loop=42
@ 2024-09-12 18:44 Ken Mankoff
  2024-09-13  6:16 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Ken Mankoff @ 2024-09-12 18:44 UTC (permalink / raw)
  To: 73218

[-- Attachment #1: Type: text/plain, Size: 593 bytes --]

Tags: patch

Hello,

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.

In GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33,
 cairo version 1.16.0) of 2024-08-20 built on t480
Repository revision: ae8f815613c2e072e92aa8fe7b4bcf2fdabc7408
Repository branch: HEAD
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Ubuntu 22.04.5 LTS

Configured using:
 'configure --prefix=/home/kdm/local/emacs'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-Fortran-indent-below-do_not_a_loop-42.patch --]
[-- Type: text/patch, Size: 953 bytes --]

From ee63122df9d4ad4904030568d56d0ab9f2d200ea Mon Sep 17 00:00:00 2001
From: "Kenneth D. Mankoff" <mankoff@gmail.com>
Date: Thu, 12 Sep 2024 11:34:38 -0700
Subject: [PATCH] Fix Fortran indent below do_not_a_loop=42

---
 lisp/progmodes/fortran.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index 8a726dfe66e..0643df64f65 100644
--- 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_]*")
                (setq icol (+ icol fortran-do-indent)))
               ((looking-at
                 "\\(structure\\|union\\|map\\|interface\\)\
-- 
2.34.1


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

end of thread, other threads:[~2024-09-14 14:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-12 18:44 bug#73218: [PATCH] Fix Fortran indent below do_not_a_loop=42 Ken Mankoff
2024-09-13  6:16 ` Eli Zaretskii
2024-09-13 15:44   ` Ken Mankoff
2024-09-14 11:15     ` Eli Zaretskii
2024-09-14 14:09       ` Ken Mankoff
2024-09-14 14:20         ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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