GNU bug report logs -
#33208
26.1; mark-defun gives incorrect results in some fixed format FORTRAN
Previous Next
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
View this message in rfc822 format
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> "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.)
But does fortran-beginning-of-subprogram do what it documents now after
the fix when arg < 0?
I cannot recall ever writing anything in Fortran so I should just keep
silent, but I spent much time recently studying the beginning-of-defun
and friends, so this caught my eye.
Best regards
--
Tomas
This bug report was last modified 4 years and 219 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.