From: Salvatore Filippone <filippone.salvatore@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: f90.el matching END statements
Date: Thu, 28 Nov 2019 11:39:21 +0000 [thread overview]
Message-ID: <CANSzZf7Bjv5tBYhtNHV7XJGJs0uV=OrbytFCYcXLyaz3DzN-Cg@mail.gmail.com> (raw)
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
next reply other threads:[~2019-11-28 11:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-28 11:39 Salvatore Filippone [this message]
2019-11-29 11:46 ` f90.el matching END statements Stefan Kangas
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANSzZf7Bjv5tBYhtNHV7XJGJs0uV=OrbytFCYcXLyaz3DzN-Cg@mail.gmail.com' \
--to=filippone.salvatore@gmail.com \
--cc=help-gnu-emacs@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).