GNU bug report logs - #38415
f90.el matching END statements

Previous Next

Package: emacs;

Reported by: Salvatore Filippone <filippone.salvatore <at> gmail.com>

Date: Thu, 28 Nov 2019 16:37:01 UTC

Severity: normal

Fixed in version 27.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Salvatore Filippone <filippone.salvatore <at> gmail.com>
To: 38415 <at> debbugs.gnu.org
Subject: bug#38415: f90.el matching END statements
Date: Thu, 28 Nov 2019 10:08:17 +0000
Dear All,
I have recently run into an issue with f90.el, version 26.2
distributed with fedora 30.
The issue is with the autocompletion feature; Fortran 2008 has
introduced submodules; among the changes entailed by this, it is now
possible to have a piece of code like the following:
--------------------
  interface
    module subroutine foo(bar)
      integer  :: bar
    end subroutine foo
  end interface
---------------------
Now, if I hit TAB on the first "end" the autocompletion feature tries to insert
   end module subroutine
which is wrong, whereas I would like to insert
   end subroutine foo

I have found a fix for this. I changed file f90.el:1385-1386  from
-------------
   ((and (not (looking-at "module[ \t]*procedure\\_>"))
         (looking-at "\\(module\\)[ \t]+\\(\\(?:\\sw\\|\\s_\\)+\\)\\_>"))
--------------
to
--------------
   ((and (not (or
           (looking-at "module[ \t]*procedure\\_>")
           (looking-at "module[ \t]*subroutine\\_>")))
         (looking-at "\\(module\\)[ \t]+\\(\\(?:\\sw\\|\\s_\\)+\\)\\_>"))
---------------
and I got the desired behaviour.
It is quite possible that somebody on this list will have a better
solution, but this does the job.

Hope this helps
Salvatore Filippone




This bug report was last modified 5 years and 129 days ago.

Previous Next


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