From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ken Mankoff Newsgroups: gmane.emacs.devel Subject: Fortran indentation Date: Mon, 26 Aug 2024 16:37:54 -0700 Message-ID: <87v7zm6ejx.fsf@kenmankoff.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20096"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 27 04:22:20 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1silqe-00059R-Cr for ged-emacs-devel@m.gmane-mx.org; Tue, 27 Aug 2024 04:22:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1silpp-0006pQ-3S; Mon, 26 Aug 2024 22:21:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sijHb-0004eW-Mg for emacs-devel@gnu.org; Mon, 26 Aug 2024 19:37:59 -0400 Original-Received: from mail-pl1-f175.google.com ([209.85.214.175]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sijHa-0000K7-0e for emacs-devel@gnu.org; Mon, 26 Aug 2024 19:37:59 -0400 Original-Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2023dd9b86aso37290855ad.1 for ; Mon, 26 Aug 2024 16:37:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724715476; x=1725320276; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=vvkMh+6pvllb5CkSBoYIN+9n+uCVPzYpfjMqPa3ngm0=; b=dhhaizyFm+KgTQqcZw2rfx7BjeDv1NbO/jgxR7Z7xG9yIMhgO8Luwpf8DE0WXoKlQk otUAdXB86Dt9Av7DOgbJ4eKk9FHn9YOG9IZUd2e1HuGPYeTyLigZINmBpsmVZgEgACjd dovXQdshmXGODjDjlKU/k+i3SSrLI5Olxk2K8C5R+tXRD2X6MRP0qCX6irlOX7Q11pL0 DDivJ5pI2MWYFh1Ls/wPW+skqS5p76cb8zaaRZ6JEYATM+dC15vtM8SEr0UfYt2auFRj mYTMRKx1gp14ys5QaeQL493vquRsroCzICg1lFRmAwq3J0QouAvge53FdMmcuqrZIOvx /Pfg== X-Gm-Message-State: AOJu0YwrKgN6MgnArG7IEAhrR+RQAynSZKYLFVTS2YIMe0dCJU1HudeK zvLs36svyeihFD7yD3eA/0hM/eW3qk52bbnL3U8g2pC8HUITdz9YYpsktw== X-Google-Smtp-Source: AGHT+IE7sS2aQxg+67ctMT9eRn/fVUBMKN+PJFnY1fDmQZU5fqwvc6Fks/BXcEbPXpa5jKfXdJtJ+Q== X-Received: by 2002:a17:902:c406:b0:203:a0ea:6269 with SMTP id d9443c01a7336-203a0ea6d57mr116613565ad.9.1724715476044; Mon, 26 Aug 2024 16:37:56 -0700 (PDT) Original-Received: from t480 (97-126-4-246.tukw.qwest.net. [97.126.4.246]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20385ae4fddsm72049955ad.255.2024.08.26.16.37.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2024 16:37:55 -0700 (PDT) Received-SPF: pass client-ip=209.85.214.175; envelope-from=mankoff@gmail.com; helo=mail-pl1-f175.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 26 Aug 2024 22:21:27 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323134 Archived-At: Hello, I'm working with Emacs 29.3, a Fortran file with this syntax, do_foo = some_function() if (do_foo) then ... and options (setq fortran-do-indent 2) (setq fortran-if-indent 2) (setq fortran-structure-indent 2) The if statement should not be indented, because do_foo is not the start of a do loop. I can fix this behavior if I change line 1634 of fortrtan.el from ((looking-at "do\\b") to ((looking-at "do\\ \\b") I'm not terribly familiar with all the various old Fortran syntax options and often see very little whitespace (e.g., IF(ARR(I,J).LT.0.)THEN ) so it may be inappropriate to assume a space exists after DO. Is this a reasonable fix? Should I submit a patch? Thanks, Ken Mankoff