r1267 - in /trunk/packages/vim-scripts/debian: changelog patches/closetag-sanity.dpatch

jamessan at users.alioth.debian.org jamessan at users.alioth.debian.org
Sat Jul 5 01:28:20 UTC 2008


Author: jamessan
Date: Sat Jul  5 01:28:20 2008
New Revision: 1267

URL: http://svn.debian.org/wsvn/pkg-vim/?sc=1&rev=1267
Log:
* Added patches:
  - closetag-sanity.dpatch: Ensure b:unaryTagsStack is defined when calling
    GetCloseTag.  (Closes: #489239)

Added:
    trunk/packages/vim-scripts/debian/patches/closetag-sanity.dpatch   (with props)
Modified:
    trunk/packages/vim-scripts/debian/changelog

Modified: trunk/packages/vim-scripts/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/debian/changelog?rev=1267&op=diff
==============================================================================
--- trunk/packages/vim-scripts/debian/changelog (original)
+++ trunk/packages/vim-scripts/debian/changelog Sat Jul  5 01:28:20 2008
@@ -7,6 +7,9 @@
   [ James Vega ]
   * Updated addons:
     - NERD Commenter, vcscommand
+  * Added patches:
+    - closetag-sanity.dpatch: Ensure b:unaryTagsStack is defined when calling
+      GetCloseTag.  (Closes: #489239)
 
  -- martin f. krafft <madduck at debian.org>  Thu, 19 Jun 2008 17:24:13 +0200
 

Added: trunk/packages/vim-scripts/debian/patches/closetag-sanity.dpatch
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/debian/patches/closetag-sanity.dpatch?rev=1267&op=file
==============================================================================
--- trunk/packages/vim-scripts/debian/patches/closetag-sanity.dpatch (added)
+++ trunk/packages/vim-scripts/debian/patches/closetag-sanity.dpatch Sat Jul  5 01:28:20 2008
@@ -1,0 +1,54 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## closetag-sanity.dpatch by James Vega <jamessan at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Ensure b:unaryTagsStack is defined whenever GetCloseTag is called.
+
+ at DPATCH@
+diff -urNad vim-scripts~/macros/closetag.vim vim-scripts/macros/closetag.vim
+--- vim-scripts~/macros/closetag.vim	2008-07-04 21:24:42.000000000 -0400
++++ vim-scripts/macros/closetag.vim	2008-07-04 20:08:23.000000000 -0400
+@@ -127,16 +127,6 @@
+ endif
+ let loaded_closetag=1
+ 
+-" if html, don't close certain tags.  Works best if ignorecase is set.
+-" otherwise, capitalize these elements according to your html editing style
+-if !exists("b:unaryTagsStack") || exists("b:closetag_html_style")
+-    if &filetype == "html" || exists("b:closetag_html_style")
+-	let b:unaryTagsStack="area base br dd dt hr img input link meta param"
+-    else " for xsl and xsl
+-	let b:unaryTagsStack=""
+-    endif
+-endif
+-
+ " set up mappings for tag closing
+ inoremap <C-_> <C-R>=GetCloseTag()<CR>
+ map <C-_> a<C-_><ESC>
+@@ -226,6 +216,7 @@
+ " Returns closing tag for most recent unclosed tag, respecting the
+ " current setting of b:unaryTagsStack for tags that should not be closed
+ function! GetCloseTag()
++    call s:SanityCheck()
+     let tag=GetLastOpenTag("b:unaryTagsStack")
+     if tag == ""
+ 	return ""
+@@ -234,6 +225,18 @@
+     endif
+ endfunction
+ 
++function! s:SanityCheck()
++    " if html, don't close certain tags.  Works best if ignorecase is set.
++    " otherwise, capitalize these elements according to your html editing style
++    if !exists("b:unaryTagsStack") || exists("b:closetag_html_style")
++	if &filetype == "html" || exists("b:closetag_html_style")
++	    let b:unaryTagsStack="area base br dd dt hr img input link meta param"
++	else " for xsl and xsl
++	    let b:unaryTagsStack=""
++	endif
++    endif
++endfunction
++
+ " return 1 if the cursor is in a syntactically identified comment field
+ " (fails for empty lines: always returns not-in-comment)
+ function! s:InComment()

Propchange: trunk/packages/vim-scripts/debian/patches/closetag-sanity.dpatch
------------------------------------------------------------------------------
    svn:executable = *




More information about the pkg-vim-maintainers mailing list