From: Ken Mankoff <km@kenmankoff.com>
To: 73218@debbugs.gnu.org
Subject: bug#73218: [PATCH] Fix Fortran indent below do_not_a_loop=42
Date: Thu, 12 Sep 2024 11:44:44 -0700 [thread overview]
Message-ID: <87o74semoz.fsf@kenmankoff.com> (raw)
[-- 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
next reply other threads:[~2024-09-12 18:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 18:44 Ken Mankoff [this message]
2024-09-13 6:16 ` bug#73218: [PATCH] Fix Fortran indent below do_not_a_loop=42 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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o74semoz.fsf@kenmankoff.com \
--to=km@kenmankoff.com \
--cc=73218@debbugs.gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.