GNU bug report logs - #33208
26.1; mark-defun gives incorrect results in some fixed format FORTRAN

Previous Next

Package: emacs;

Reported by: "Fairey, Robin M." <Robin.Fairey <at> iti-global.com>

Date: Tue, 30 Oct 2018 17:23:02 UTC

Severity: minor

Tags: fixed

Found in version 26.1

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 33208 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Fairey, Robin M." <Robin.Fairey <at> iti-global.com>
Cc: 33208 <at> debbugs.gnu.org
Subject: Re: bug#33208: 26.1; mark-defun gives incorrect results in some
 fixed format FORTRAN
Date: Wed, 09 Dec 2020 17:37:24 +0100
"Fairey, Robin M." <Robin.Fairey <at> iti-global.com> writes:

> Starting from emacs -Q,
> - Open a new fixed format fortran file ( C-x C-f t e s t . f o r <RET> )
> - Populate it with the following text:
>       SUBROUTINE ONE
>
>       END SUBROUTINE
> C------------------------------------------------------------------------
>       SUBROUTINE TWO
>
>       END SUBROUTINE
> C------------------------------------------------------------------------
>       SUBROUTINE THREE
>
>       END SUBROUTINE
>
> Position point on line 6 (the blank line in TWO), and observe that
> M-x mark-defun marks TWO and THREE instead of just TWO.
>
> Inserting an additional newline between the comment line and the start
> of TWO results in correct behaviour.

Looks like the interface of beginning-of-defun-function has changed --
it now takes an optional arg, and fortran-beginning-of-subprogram didn't
implement that.

I've now fixed that in Emacs 28, and mark-defun now seems to work fine
for me there.  (I don't know Fortran, so my testing is limited, though.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 220 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.