Bug#308865: marked as forwarded (vim-common: matchit.vim problems with fortran 90 module procedure statements)

Debian Bug Tracking System owner at bugs.debian.org
Sat Sep 24 09:18:12 UTC 2005


Your message dated Sat, 24 Sep 2005 11:05:39 +0200
with message-id <20050924090538.GB17385 at takhisis.invalid>
has caused the Debian Bug report #308865,
regarding vim-common: matchit.vim problems with fortran 90 module procedure statements
to be marked as having been forwarded to the upstream software
author(s) "Ajit J. Thakkar" <ajit at unb.ca>, Bram Moolenaar <Bram at moolenaar.net>.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

---------------------------------------
Received: (at 308865-forwarded) by bugs.debian.org; 24 Sep 2005 09:05:43 +0000
>From zack at bononia.it Sat Sep 24 02:05:43 2005
Return-path: <zack at bononia.it>
Received: from sockmel.bononia.it [194.242.226.39] 
	by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
	id 1EJ5yY-00033w-00; Sat, 24 Sep 2005 02:05:42 -0700
Received: from muletto.takhisis.invalid (85-18-14-42.fastres.net [85.18.14.42])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "Stefano Zacchiroli", Issuer "sockmel.bononia.it" (verified OK))
	by sockmel.bononia.it (Postfix) with ESMTP id 07C7D56D48;
	Sat, 24 Sep 2005 11:05:40 +0200 (CEST)
Received: by muletto.takhisis.invalid (Postfix, from userid 1000)
	id 5A126E66F3; Sat, 24 Sep 2005 11:05:39 +0200 (CEST)
Date: Sat, 24 Sep 2005 11:05:39 +0200
From: Stefano Zacchiroli <zack at debian.org>
To: "Ajit J. Thakkar" <ajit at unb.ca>,
	Bram Moolenaar <Bram at moolenaar.net>
Cc: 308865-forwarded at bugs.debian.org,
	308865-submitter at bugs.debian.org
Subject: patch for Fortran's matchit support in vim ("module procedure")
Message-ID: <20050924090538.GB17385 at takhisis.invalid>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="3Gf/FFewwPeBMqCJ"
Content-Disposition: inline
User-Agent: Mutt/1.5.10i
Delivered-To: 308865-forwarded at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2005_01_02


--3Gf/FFewwPeBMqCJ
Content-Type: multipart/mixed; boundary="4jXrM3lyYWu4nBt5"
Content-Disposition: inline


--4jXrM3lyYWu4nBt5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Ajit and Bram,
  a debian user reported that the attached fragment of valid Fortran
code is not properly handled by the matchit support of vim since hitting
'%' on the first "module" keyword (line 1) do not jump to the
corresponding "end module" sequence of line 19.

The reason is that the "module procedure" sequence of line 4 fools
matchit.

The attached patch fixes the problem, avoiding considering "module
procedure" sequences as parts of matching for "module" ... "end module".
Could you please consider applying it to ftplugin/fortran.vim?

Thanks in advance.

--=20
Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/
If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. -!-

--4jXrM3lyYWu4nBt5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="a.f90"

module match
  implicit none
  INTERFACE print_a_number
    module procedure print_real, print_integer
  END INTERFACE print_a_number
contains

subroutine print_real(r)
  implicit none
  real :: r
  write(*,*) 'real number = ', r
end subroutine print_real

subroutine print_integer(i)
  implicit none
  integer :: i
  write(*,*) 'integer = ', i
end subroutine print_integer
end module match

program testsuite
  use match
  call print_a_number(2.3)
  call print_a_number(5)
end program testsuite

--4jXrM3lyYWu4nBt5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="145_fortran.vim.diff"
Content-Transfer-Encoding: quoted-printable

diff -urN vim63/runtime/ftplugin/fortran.vim vim63.new/runtime/ftplugin/for=
tran.vim
--- vim63/runtime/ftplugin/fortran.vim	2003-05-18 20:20:26.000000000 +0200
+++ vim63.new/runtime/ftplugin/fortran.vim	2005-09-24 10:53:44.000000000 +0=
200
@@ -83,6 +83,7 @@
   let s:notend =3D '\%(\<end\s\+\)\@<!'
   let s:notselect =3D '\%(\<select\s\+\)\@<!'
   let s:notelse =3D '\%(\<end\s\+\|\<else\s\+\)\@<!'
+  let s:notprocedure =3D '\%(\s\+procedure\>\)\@!'
   let b:match_ignorecase =3D 1
   let b:match_words =3D
     \ '\<select\s*case\>:' . s:notselect. '\<case\>:\<end\s*select\>,' .
@@ -95,7 +96,7 @@
     \ s:notend . '\<interface\>:\<end\s*interface\>,'.
     \ s:notend . '\<subroutine\>:\<end\s*subroutine\>,'.
     \ s:notend . '\<function\>:\<end\s*function\>,'.
-    \ s:notend . '\<module\>:\<end\s*module\>,'.
+    \ s:notend . '\<module\>' . s:notprocedure . ':\<end\s*module\>,'.
     \ s:notend . '\<program\>:\<end\s*program\>'
 endif
=20

--4jXrM3lyYWu4nBt5--

--3Gf/FFewwPeBMqCJ
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDNRbi1cqbBPLEI7wRArwmAKCGGZoov56IUjExmL0uMNd9s6lESQCeMPZV
lGxOdIIpW5j+mFW/UMKav0c=
=JxdJ
-----END PGP SIGNATURE-----

--3Gf/FFewwPeBMqCJ--



More information about the pkg-vim-maintainers mailing list