devel/vim vim-7.1-ada.patch,1.1,1.2

Karsten Hopp (karsten) fedora-extras-commits at redhat.com
Fri Jan 18 13:52:13 UTC 2008


Author: karsten

Update of /cvs/extras/devel/vim
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25824

Modified Files:
	vim-7.1-ada.patch 
Log Message:
- fix ada patch

vim-7.1-ada.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 vim-7.1-ada.patch
Index: vim-7.1-ada.patch
===================================================================
RCS file: /cvs/extras/devel/vim/vim-7.1-ada.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vim-7.1-ada.patch	16 Jan 2008 15:58:14 -0000	1.1
+++ vim-7.1-ada.patch	18 Jan 2008 13:52:03 -0000	1.2
@@ -1,662 +1,69 @@
-diff -urN vim71/1/ada_options.vim vim71_ada/1/ada_options.vim
---- vim71/1/ada_options.vim	1970-01-01 01:00:00.000000000 +0100
-+++ vim71_ada/1/ada_options.vim	2008-01-16 16:37:03.000000000 +0100
-@@ -0,0 +1,105 @@
-+"------------------------------------------------------------------------------
-+"  Description: Options setable by the Ada plugin
-+"	   $Id$
-+"    Copyright: Copyright (C) 2006 Martin Krischik
-+"   Maintainer:	Martin Krischik
-+"      $Author$
-+"	 $Date$
-+"      Version: 4.5
-+"    $Revision$
-+"     $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/ada_options.vim $
-+"      History:	24.05.2006 MK Unified Headers
-+"		16.07.2006 MK Ada-Mode as vim-ball
-+"		02.10.2006 MK Folding for "gnat pretty"
-+"		15.10.2006 MK Bram's suggestion for runtime integration
-+"		05.11.2006 MK Bram suggested to save on spaces
-+"	 Usage: copy content into your .vimrc and change options to your
-+"		likeing.
-+"    Help Page: ft-ada-options
-+"------------------------------------------------------------------------------
-+
-+echoerr 'It is suggested to copy the content of ada_options into .vimrc!'
-+finish " 1}}}
-+
-+" Section: Ada options {{{1
-+
-+   let   g:ada_abbrev		       = 1
-+   let   g:ada_default_compiler	       = 'gnat'
-+   let   g:ada_extended_tagging	       = 'list'
-+   let   g:ada_folding		       = 'i'
-+"  let   g:ada_folding		       = 'gibxp'
-+"  let   g:ada_folding		       = 'spftc'
-+   let   g:ada_rainbow_color	       = 1
-+   let   g:ada_space_errors	       = 1
-+   let   g:ada_standard_types	       = 1
-+   let   g:ada_with_gnat_project_files = 1
-+"  let	 g:ada_extended_completion     = 1
-+"  let   g:ada_line_errors	       = 1
-+"  let   g:ada_omni_with_keywords      = 1
-+
-+   let   g:Tlist_Exit_OnlyWindow       = 1
-+   let   g:Tlist_File_Fold_Auto_Close  = 1
-+   let   g:Tlist_Sort_Type	       = "name"
-+
-+   let   g:NERD_use_ada_with_spaces    = 1
-+
-+   let   g:backup_directory	       = '.backups'
-+   let   g:backup_purge		       = 10
-+
-+   let   g:mapleader		       = "<F12>"
-+
-+   if &diff
-+       let   g:Tlist_Auto_Open	       = 0
-+   else
-+       let   g:Tlist_Auto_Open	       = 1
-+   endif
-+
-+   filetype plugin indent on
-+   syntax enable
-+
-+" }}}1
-+
-+" Section: Vimball options {{{1
-+:set expandtab fileformat=unix encoding=utf-8
-+:.+2,.+13 MkVimball ada-4.5.0
-+
-+ada_options.vim
-+autoload/ada.vim
-+autoload/adacomplete.vim
-+autoload/decada.vim
-+autoload/gnat.vim
-+compiler/decada.vim
-+compiler/gnat.vim
-+doc/ft_ada.txt
-+ftdetect/ada.vim
-+ftplugin/ada.vim
-+indent/ada.vim
-+syntax/ada.vim
-+
-+" }}}1
-+
-+" Section: Tar options {{{1
-+
-+tar --create --bzip2	      \
-+   --file="ada-4.5.0.tar.bz2" \
-+   autoload/ada.vim	      \
-+   autoload/adacomplete.vim   \
-+   autoload/decada.vim	      \
-+   autoload/gnat.vim	      \
-+   compiler/decada.vim	      \
-+   compiler/gnat.vim	      \
-+   doc/ft_ada.txt	      \
-+   ftdetect/ada.vim	      \
-+   ftplugin/ada.vim	      \
-+   indent/ada.vim	      \
-+   syntax/ada.vim	      ;
-+
-+" }}}1
-+
-+"------------------------------------------------------------------------------
-+"   Copyright (C) 2006	Martin Krischik
-+"
-+"   Vim is Charityware - see ":help license" or uganda.txt for licence details.
-+"------------------------------------------------------------------------------
-+" vim: nowrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
-+" vim: textwidth=0 foldmethod=marker foldmethod=marker
-diff -urN vim71/1/autoload/adacomplete.vim vim71_ada/1/autoload/adacomplete.vim
---- vim71/1/autoload/adacomplete.vim	1970-01-01 01:00:00.000000000 +0100
-+++ vim71_ada/1/autoload/adacomplete.vim	2008-01-16 16:37:03.000000000 +0100
-@@ -0,0 +1,109 @@
-+"------------------------------------------------------------------------------
-+"  Description: Vim Ada omnicompletion file
-+"     Language:	Ada (2005)
+diff -urN vim71/runtime/autoload/adacomplete.vim vim71_ada/runtime/autoload/adacomplete.vim
+--- vim71/runtime/autoload/adacomplete.vim	2007-05-05 19:34:16.000000000 +0200
++++ vim71_ada/runtime/autoload/adacomplete.vim	2008-01-16 16:46:40.000000000 +0100
+@@ -1,13 +1,13 @@
+ "------------------------------------------------------------------------------
+ "  Description: Vim Ada omnicompletion file
+ "     Language:	Ada (2005)
+-"	   $Id$
 +"	   $Id$
-+"   Maintainer:	Martin Krischik
+ "   Maintainer:	Martin Krischik
+-"      $Author$
+-"	 $Date$
+-"      Version: 4.2
+-"    $Revision$
+-"     $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $
 +"      $Author$
 +"	 $Date$
 +"      Version: 4.5
 +"    $Revision$
 +"     $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $
-+"      History: 24.05.2006 MK Unified Headers
-+"		26.05.2006 MK improved search for begin of word.
-+"		16.07.2006 MK Ada-Mode as vim-ball
-+"		15.10.2006 MK Bram's suggestion for runtime integration
-+"		05.11.2006 MK Bram suggested not to use include protection for
-+"			      autoload
-+"		05.11.2006 MK Bram suggested agaist using setlocal omnifunc 
-+"		05.11.2006 MK Bram suggested to save on spaces
-+"    Help Page: ft-ada-omni
-+"------------------------------------------------------------------------------
-+
-+if version < 700
-+   finish
-+endif
-+
-+" Section: adacomplete#Complete () {{{1
-+"
-+" This function is used for the 'omnifunc' option.
-+"
-+function! adacomplete#Complete (findstart, base)
-+   if a:findstart == 1
-+      return ada#User_Complete (a:findstart, a:base)
-+   else
-+      "
-+      " look up matches
-+      "
-+      if exists ("g:ada_omni_with_keywords")
-+	 call ada#User_Complete (a:findstart, a:base)
-+      endif
-+      "
-+      "  search tag file for matches
-+      "
-+      let l:Pattern  = '^' . a:base . '.*$'
-+      let l:Tag_List = taglist (l:Pattern)
-+      "
-+      " add symbols
-+      "
-+      for Tag_Item in l:Tag_List
-+	 if l:Tag_Item['kind'] == ''
-+	    "
-+	    " Tag created by gnat xref
-+	    "
-+	    let l:Match_Item = {
-+	       \ 'word':  l:Tag_Item['name'],
-+	       \ 'menu':  l:Tag_Item['filename'],
-+	       \ 'info':  "Symbol from file " . l:Tag_Item['filename'] . " line " . l:Tag_Item['cmd'],
-+	       \ 'kind':  's',
-+	       \ 'icase': 1}
-+	 else
-+	    "
-+	    " Tag created by ctags
-+	    "
-+	    let l:Info	= 'Symbol		 : ' . l:Tag_Item['name']  . "\n"
-+	    let l:Info .= 'Of type		 : ' . g:ada#Ctags_Kinds[l:Tag_Item['kind']][1]  . "\n"
[...43935 lines suppressed...]
++" Return a "mark" for the original position, so that
++"   let m = MultiMatch("bW", "n") ... execute m
++" will return to the original position.  If there is a problem, do not
++" move the cursor and return "", unless a count is given, in which case
++" go up or down as many levels as possible and again return "".
++" TODO This relies on the same patterns as % matching.  It might be a good
++" idea to give it its own matching patterns.
++fun! s:MultiMatch(spflag, mode)
++  if !exists("b:match_words") || b:match_words == ""
++    return ""
++  end
++  let restore_options = (&ic ? "" : "no") . "ignorecase"
++  if exists("b:match_ignorecase")
++    let &ignorecase = b:match_ignorecase
++  endif
++  let startline = line(".")
++  let startcol = col(".")
 +
-+Thanks to Normandie Azucena for emailing me about the vera filetype.
++  " First step:  if not already done, set the script variables
++  "   s:do_BR	flag for whether there are backrefs
++  "   s:pat	parsed version of b:match_words
++  "   s:all	regexp based on s:pat and the default groups
++  " This part is copied and slightly modified from s:Match_wrapper().
++  let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
++    \ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>'
++  " Allow b:match_words = "GetVimMatchWords()" .
++  if b:match_words =~ ":"
++    let match_words = b:match_words
++  else
++    execute "let match_words =" b:match_words
++  endif
++  if (match_words != s:last_words) || (&mps != s:last_mps) ||
++    \ exists("b:match_debug")
++    let s:last_words = match_words
++    let s:last_mps = &mps
++    if match_words !~ s:notslash . '\\\d'
++      let s:do_BR = 0
++      let s:pat = match_words
++    else
++      let s:do_BR = 1
++      let s:pat = s:ParseWords(match_words)
++    endif
++    let s:all = '\%(' . substitute(s:pat . (strlen(s:pat)?",":"") . default,
++      \	'[,:]\+','\\|','g') . '\)'
++    if exists("b:match_debug")
++      let b:match_pat = s:pat
++    endif
++  endif
 +
-+Thanks to Florian Apolloner for emailing me about the ldif filetype.
++  " Second step:  figure out the patterns for searchpair()
++  " and save the screen, cursor position, and 'ignorecase'.
++  " - TODO:  A lot of this is copied from s:Match_wrapper().
++  " - maybe even more functionality should be split off
++  " - into separate functions!
++  let cdefault = (s:pat =~ '[^,]$' ? "," : "") . default
++  let open =  substitute(s:pat . cdefault,
++	\ s:notslash . '\zs:.\{-}' . s:notslash . ',', '\\),\\(', 'g')
++  let open =  '\(' . substitute(open, s:notslash . '\zs:.*$', '\\)', '')
++  let close = substitute(s:pat . cdefault,
++	\ s:notslash . '\zs,.\{-}' . s:notslash . ':', '\\),\\(', 'g')
++  let close = substitute(close, '^.\{-}' . s:notslash . ':', '\\(', '') . '\)'
++  if exists("b:match_skip")
++    let skip = b:match_skip
++  elseif exists("b:match_comment") " backwards compatibility and testing!
++    let skip = "r:" . b:match_comment
++  else
++    let skip = 's:comment\|string'
++  endif
++  let skip = s:ParseSkip(skip)
++  " let restore_cursor = line(".") . "G" . virtcol(".") . "|"
++  " normal! H
++  " let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor
++  let restore_cursor = virtcol(".") . "|"
++  normal! g0
++  let restore_cursor = line(".") . "G" .  virtcol(".") . "|zs" . restore_cursor
++  normal! H
++  let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor
++  execute restore_cursor
 +
-+Cheers to David Fishburn for emailing me with the lookupfile filetype.
++  " Third step: call searchpair().
++  " Replace '\('--but not '\\('--with '\%(' and ',' with '\|'.
++  let openpat =  substitute(open, '\(\\\@<!\(\\\\\)*\)\@<=\\(', '\\%(', 'g')
++  let openpat = substitute(openpat, ',', '\\|', 'g')
++  let closepat = substitute(close, '\(\\\@<!\(\\\\\)*\)\@<=\\(', '\\%(', 'g')
++  let closepat = substitute(closepat, ',', '\\|', 'g')
++  if skip =~ 'synID' && !(has("syntax") && exists("g:syntax_on"))
++    let skip = '0'
++  else
++    execute "if " . skip . "| let skip = '0' | endif"
++  endif
++  mark '
++  let level = v:count1
++  while level
++    if searchpair(openpat, '', closepat, a:spflag, skip) < 1
++      call s:CleanUp(restore_options, a:mode, startline, startcol)
++      return ""
++    endif
++    let level = level - 1
++  endwhile
 +
-+Thanks to Niels Aan de Brugh for emailing me with the rst filetype.
++  " Restore options and return a string to restore the original position.
++  call s:CleanUp(restore_options, a:mode, startline, startcol)
++  return restore_cursor
++endfun
 +
-+Cheers to heptite on #vim for helping me track down some tab-space conversion
-+bugs.
++" Search backwards for "if" or "while" or "<tag>" or ...
++" and return "endif" or "endwhile" or "</tag>" or ... .
++" For now, this uses b:match_words and the same script variables
++" as s:Match_wrapper() .  Later, it may get its own patterns,
++" either from a buffer variable or passed as arguments.
++" fun! s:Autocomplete()
++"   echo "autocomplete not yet implemented :-("
++"   if !exists("b:match_words") || b:match_words == ""
++"     return ""
++"   end
++"   let startpos = s:MultiMatch("bW")
++"
++"   if startpos == ""
++"     return ""
++"   endif
++"   " - TODO:  figure out whether 'if' or '<tag>' matched, and construct
++"   " - the appropriate closing.
++"   let matchline = getline(".")
++"   let curcol = col(".") - 1
++"   " - TODO:  Change the s:all argument if there is a new set of match pats.
++"   let regexp = s:Wholematch(matchline, s:all, curcol)
++"   let suf = strlen(matchline) - matchend(matchline, regexp)
++"   let prefix = (curcol ? '^.\{'  . curcol . '}\%(' : '^\%(')
++"   let suffix = (suf ? '\).\{' . suf . '}$'  : '\)$')
++"   " Reconstruct the version with unresolved backrefs.
++"   let patBR = substitute(b:match_words.',', '[,:]*,[,:]*', ',', 'g')
++"   let patBR = substitute(patBR, ':\{2,}', ':', "g")
++"   " Now, set group and groupBR to the matching group: 'if:endif' or
++"   " 'while:endwhile' or whatever.
++"   let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, patBR)
++"   let i = matchend(group, s:notslash . ",")
++"   let groupBR = strpart(group, i)
++"   let group = strpart(group, 0, i-1)
++"   " Now, matchline =~ prefix . substitute(group,':','\|','g') . suffix
++"   if s:do_BR
++"     let group = s:InsertRefs(groupBR, prefix, group, suffix, matchline)
++"   endif
++" " let g:group = group
++"
++"   " - TODO:  Construct the closing from group.
++"   let fake = "end" . expand("<cword>")
++"   execute startpos
++"   return fake
++" endfun
 +
-+Cheers to Don Hatlestad for telling me about the ahk filetype
++" Close all open structures.  "Get the heck out of here!"
++" fun! s:Gthhoh()
++"   let close = s:Autocomplete()
++"   while strlen(close)
++"     put=close
++"     let close = s:Autocomplete()
++"   endwhile
++" endfun
 +
-+Thanks to Christophe Benz for emailing me with the Desktop and xsd filetypes.
++" Parse special strings as typical skip arguments for searchpair():
++"   s:foo becomes (current syntax item) =~ foo
++"   S:foo becomes (current syntax item) !~ foo
++"   r:foo becomes (line before cursor) =~ foo
++"   R:foo becomes (line before cursor) !~ foo
++fun! s:ParseSkip(str)
++  let skip = a:str
++  if skip[1] == ":"
++    if skip[0] == "s"
++      let skip = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '" .
++	\ strpart(skip,2) . "'"
++    elseif skip[0] == "S"
++      let skip = "synIDattr(synID(line('.'),col('.'),1),'name') !~? '" .
++	\ strpart(skip,2) . "'"
++    elseif skip[0] == "r"
++      let skip = "strpart(getline('.'),0,col('.'))=~'" . strpart(skip,2). "'"
++    elseif skip[0] == "R"
++      let skip = "strpart(getline('.'),0,col('.'))!~'" . strpart(skip,2). "'"
++    endif
++  endif
++  return skip
++endfun
 +
-+Cheers to Cheng Fang for the bug reports :D
++let &cpo = s:save_cpo
 +
-+Cheers to myself for being the best looking man on Earth!
-+=== END_DOC
-+" vim: set foldmethod=marker :
++" vim:sts=2:sw=2:
 diff -urN vim71/runtime/plugin/taglist.vim vim71_ada/runtime/plugin/taglist.vim
 --- vim71/runtime/plugin/taglist.vim	1970-01-01 01:00:00.000000000 +0100
 +++ vim71_ada/runtime/plugin/taglist.vim	2008-01-16 16:37:03.000000000 +0100




More information about the fedora-extras-commits mailing list