[email protected]
[Top] [All Lists]

Bug#308865: marked as forwarded (vim-common: matchit.vim problems with f

Subject: Bug#308865: marked as forwarded vim-common: matchit.vim problems with fortran 90 module procedure statements
From: Debian Bug Tracking System
Date: Sat, 24 Sep 2005 02:18:12 -0700
Your message dated Sat, 24 Sep 2005 11:05:39 +0200
with message-id <[email protected]>
has caused the Debian Bug report #308865,
regarding vim-common: matchit.vim problems with fortran 90 module procedure 
to be marked as having been forwarded to the upstream software
author(s) "Ajit J. Thakkar" <[email protected]>, Bram Moolenaar <[email protected]>.

(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 [email protected] Sat Sep 24 02:05:43 2005
Return-path: <[email protected]>
Received: from sockmel.bononia.it [] 
        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 [])
        (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
        (Client CN "Stefano Zacchiroli", Issuer "sockmel.bononia.it" (verified 
        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 <[email protected]>
To: "Ajit J. Thakkar" <[email protected]>,
        Bram Moolenaar <[email protected]>
Cc: [email protected],
        [email protected]
Subject: patch for Fortran's matchit support in vim ("module procedure")
Message-ID: <[email protected]>
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: [email protected]
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-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 

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

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

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.

Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
[email protected]{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. -!-

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

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

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=
--- 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 
@@ -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\>'


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

Version: GnuPG v1.4.1 (GNU/Linux)



To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

<Prev in Thread] Current Thread [Next in Thread>
  • Bug#308865: marked as forwarded (vim-common: matchit.vim problems with fortran 90 module procedure statements), Debian Bug Tracking System <=