[vim-perl-support] update patch to fix more template problems

Iain Arnell iarnell at fedoraproject.org
Mon Oct 10 14:28:47 UTC 2011


commit a0f55eb03eb0ead588bd741740408cf94953e9b4
Author: Iain Arnell <iarnell at gmail.com>
Date:   Mon Oct 10 16:28:34 2011 +0200

    update patch to fix more template problems

 vim-perl-support-4.13-local-template.patch |   12 ----
 vim-perl-support-4.13-templates.patch      |   80 ++++++++++++++++++++++++++++
 vim-perl-support.spec                      |    9 +++-
 3 files changed, 87 insertions(+), 14 deletions(-)
---
diff --git a/vim-perl-support-4.13-templates.patch b/vim-perl-support-4.13-templates.patch
new file mode 100644
index 0000000..9cc8d49
--- /dev/null
+++ b/vim-perl-support-4.13-templates.patch
@@ -0,0 +1,80 @@
+diff -up vim-perl-support-4.13/perl-support/templates/comments.template.orig vim-perl-support-4.13/perl-support/templates/comments.template
+--- vim-perl-support-4.13/perl-support/templates/comments.template.orig	2011-05-05 19:51:04.000000000 +0200
++++ vim-perl-support-4.13/perl-support/templates/comments.template	2011-09-16 09:26:44.877273516 +0200
+@@ -39,7 +39,7 @@
+ #
+ #        USAGE: ./|FILENAME|  
+ #
+-#  DESCRIPTION: |CURSOR|
++#  DESCRIPTION: <CURSOR>
+ #
+ #      OPTIONS: ---
+ # REQUIREMENTS: ---
+@@ -62,7 +62,7 @@ use warnings;
+ #
+ #         FILE: |FILENAME|
+ #
+-#  DESCRIPTION: |CURSOR|
++#  DESCRIPTION: <CURSOR>
+ #
+ #        FILES: ---
+ #         BUGS: ---
+@@ -76,7 +76,7 @@ use warnings;
+ 
+ use strict;
+ use warnings;
+->
++
+ §%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ == comment.file-description-t == start == noindent ==
+ #
+@@ -84,7 +84,7 @@ use warnings;
+ #
+ #         FILE: |FILENAME|
+ #
+-#  DESCRIPTION: |CURSOR|
++#  DESCRIPTION: <CURSOR>
+ #
+ #        FILES: ---
+ #         BUGS: ---
+@@ -109,7 +109,7 @@ use Test::More tests => 1;
+ #
+ #         FILE: |FILENAME|
+ #
+-#  DESCRIPTION: |CURSOR|
++#  DESCRIPTION: <CURSOR>
+ #
+ #       AUTHOR: |AUTHOR| (|AUTHORREF|), <|EMAIL|>
+ #      COMPANY: |COMPANY|
+diff -up vim-perl-support-4.13/plugin/perl-support.vim.orig vim-perl-support-4.13/plugin/perl-support.vim
+--- vim-perl-support-4.13/plugin/perl-support.vim.orig	2011-09-16 09:24:03.327761776 +0200
++++ vim-perl-support-4.13/plugin/perl-support.vim	2011-09-16 09:25:26.096023859 +0200
+@@ -145,7 +145,7 @@ else
+ 		let s:Perl_GlobalTemplateFile	= s:Perl_GlobalTemplateDir.'/Templates'
+ 	endif
+ 	"
+-	let s:Perl_LocalTemplateFile		= s:plugin_dir.'/perl-support/templates/Templates'
++	let s:Perl_LocalTemplateFile		= $HOME.'/.vim/perl-support/templates/Templates'
+ 	let s:Perl_LocalTemplateDir			= fnamemodify( s:Perl_LocalTemplateFile, ":p:h" ).'/'
+ 	let s:Perl_CodeSnippets  				= s:plugin_dir.'/perl-support/codesnippets/'
+ 	let s:escfilename   						= ' \%#[]'
+@@ -2481,15 +2481,15 @@ endif
+ "------------------------------------------------------------------------------
+ if has("autocmd")
+ 
+-	autocmd BufNewFile  *.pl  call Perl_InsertTemplate('comment.file-description-pl')
+-	autocmd BufNewFile  *.pm  call Perl_InsertTemplate('comment.file-description-pm')
+-	autocmd BufNewFile  *.t   call Perl_InsertTemplate('comment.file-description-t')
++	autocmd BufNewFile  *.pl  silent call Perl_InsertTemplate('comment.file-description-pl')
++	autocmd BufNewFile  *.pm  silent call Perl_InsertTemplate('comment.file-description-pm')
++	autocmd BufNewFile  *.t   silent call Perl_InsertTemplate('comment.file-description-t')
+ 
+ 	autocmd BufRead  *.pl  call Perl_HighlightJumpTargets()
+ 	autocmd BufRead  *.pm  call Perl_HighlightJumpTargets()
+ 	autocmd BufRead  *.t   call Perl_HighlightJumpTargets() 
+   "
+-  autocmd BufNewFile         *.pod  call Perl_InsertTemplate('comment.file-description-pod')
++  autocmd BufNewFile         *.pod  silent call Perl_InsertTemplate('comment.file-description-pod')
+   autocmd BufNewFile,BufRead *.t    set filetype=perl
+   "
+   " Wrap error descriptions in the quickfix window.
diff --git a/vim-perl-support.spec b/vim-perl-support.spec
index c2c1dbd..cde4b1e 100644
--- a/vim-perl-support.spec
+++ b/vim-perl-support.spec
@@ -1,6 +1,6 @@
 Name:           vim-perl-support
 Version:        4.13
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Perl-IDE for VIM
 
 Group:          Applications/Editors
@@ -9,9 +9,11 @@ License:        GPLv2
 URL:            http://www.vim.org/scripts/script.php?script_id=556
 # curl -o perl-support-4.13.zip 'http://vim.sourceforge.net/scripts/download_script.php?src_id=16507'
 Source0:        perl-support-%{version}.zip
+# fixes several problems with templates
 # see http://lug.fh-swf.de/cgi-bin/mailman/private/vim-plugins-list/2011-August/000189.html
+# and http://lug.fh-swf.de/cgi-bin/mailman/private/vim-plugins-list/2011-September/000205.html
 # (list subscribers only)
-Patch0:         vim-perl-support-4.13-local-template.patch
+Patch0:         vim-perl-support-4.13-templates.patch
 
 BuildArch:      noarch
 
@@ -120,6 +122,9 @@ exit 0
 
 
 %changelog
+* Fri Sep 16 2011 Iain Arnell <iarnell at gmail.com> 4.13-2
+- update patch to fix more template problems
+
 * Wed Sep 14 2011 Iain Arnell <iarnell at gmail.com> 4.13-1
 - update to latest upstream version
 - patch to fix handling of local templates


More information about the scm-commits mailing list