Patch 7.0.046

2006-08-08 Thread Bram Moolenaar

Patch 7.0.046
Problem:The matchparen plugin ignores parens in strings, but not in single
quotes, often marked with character.
Solution:   Also ignore parens in syntax items matching character.
Files:  runtime/plugin/matchparen.vim


*** ../vim-7.0.045/runtime/plugin/matchparen.vimSat May 13 14:52:02 2006
--- runtime/plugin/matchparen.vim   Mon Jun 26 10:53:35 2006
***
*** 1,6 
   Vim plugin for showing matching parens
   Maintainer:  Bram Moolenaar [EMAIL PROTECTED]
!  Last Change: 2006 May 11
  
   Exit quickly when:
   - this plugin was already loaded (or disabled)
--- 1,6 
   Vim plugin for showing matching parens
   Maintainer:  Bram Moolenaar [EMAIL PROTECTED]
!  Last Change: 2006 Jun 26
  
   Exit quickly when:
   - this plugin was already loaded (or disabled)
***
*** 96,102 
  
 When not in a string or comment ignore matches inside them.
let s_skip ='synIDattr(synID(line(.), col(.), 0), name) ' .
!   \ '=~?  string\\|comment'
execute 'if' s_skip '| let s_skip = 0 | endif'
  
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline)
--- 96,102 
  
 When not in a string or comment ignore matches inside them.
let s_skip ='synIDattr(synID(line(.), col(.), 0), name) ' .
!   \ '=~?  string\\|character\\|singlequote\\|comment'
execute 'if' s_skip '| let s_skip = 0 | endif'
  
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline)
*** ../vim-7.0.045/src/version.cTue Aug  8 17:06:21 2006
--- src/version.c   Tue Aug  8 18:07:37 2006
***
*** 668,669 
--- 668,671 
  {   /* Add new patch number below this line */
+ /**/
+ 46,
  /**/

-- 
I AM THANKFUL...
...for the taxes that I pay because it means that I am employed.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Patch 7.0.047

2006-08-08 Thread Bram Moolenaar

Patch 7.0.047
Problem:When running configure the exit status is wrong.
Solution:   Handle the exit status properly. (Matthew Woehlke)
Files:  configure, src/configure


*** ../vim-7.0.046/configureSun Jun 13 21:32:42 2004
--- configure   Mon Jul 10 20:26:26 2006
***
*** 3,6 
  # This is just a stub for the Unix configure script, to provide support for
  # doing ./configure in the top Vim directory.
  
! cd src  ./configure $@
--- 3,6 
  # This is just a stub for the Unix configure script, to provide support for
  # doing ./configure in the top Vim directory.
  
! cd src  exec ./configure $@
*** ../vim-7.0.046/src/configureThu Dec 22 23:38:38 2005
--- src/configure   Mon Jul 10 20:26:53 2006
***
*** 2,6 
--- 2,10 
  # run the automatically generated configure script
  CONFIG_STATUS=auto/config.status \
auto/configure $@ --srcdir=${srcdir:-.} 
--cache-file=auto/config.cache
+ result=$?
+ 
  # Stupid autoconf 2.5x causes this file to be left behind.
  if test -f configure.lineno; then rm -f configure.lineno; fi
+ 
+ exit $result
*** ../vim-7.0.046/src/version.cTue Aug  8 18:08:54 2006
--- src/version.c   Tue Aug  8 19:09:54 2006
***
*** 668,669 
--- 668,671 
  {   /* Add new patch number below this line */
+ /**/
+ 47,
  /**/

-- 
The primary purpose of the DATA statement is to give names to constants;
instead of referring to pi as 3.141592653589793 at every appearance, the
variable PI can be given that value with a DATA statement and used instead
of the longer form of the constant.  This also simplifies modifying the
program, should the value of pi change.
-- FORTRAN manual for Xerox Computers

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: Patch 7.0.047

2006-08-08 Thread mwoehlke

Bram Moolenaar wrote:

Patch 7.0.047
Problem:When running configure the exit status is wrong.
Solution:   Handle the exit status properly. (Matthew Woehlke)
Files:  configure, src/configure

[snip]

Thanks, Bram!

--
Matthew
I blame the hippo.



Re: Patch 7.0.048

2006-08-08 Thread James Vega
On Tue, Aug 08, 2006 at 08:48:31PM +0200, Bram Moolenaar wrote:
 --- 127,135 
   let nmt = s:tempname(nm)
   if rename(nm, nmt) == 0
 if exists(b:gzip_comp_arg)
 ! call system(a:cmd .   . b:gzip_comp_arg .  ' . nmt . ')
 else
 ! call system(a:cmd .  ' . nmt . ')

If the filename itself has single quotes, this will prematurely end the
quoting.  escape(nmt, ') should probably be used as well.

James
-- 
GPG Key: 1024D/61326D40 2003-09-02 James Vega [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Re: Patch 7.0.044

2006-08-08 Thread Mathias Michaelis
Dear Bram

 Patch 7.0.044
 Problem:  Perl: setting a buffer line in another buffer may result in
   changing the current buffer.
 Solution: Properly change to the buffer to be changed.
 Files:src/if_perl.xs
 
 [...]

Alas, if I want to compile this, I get the following output

---%---
C:\Program Files\ActivePerl\Bin\perl C:\Program 
Files\ActivePerl\lib\ExtUtils\xsubpp -prototypes -typemap C:\Program 
Files\ActivePerl\lib\ExtUtils\typemap  -typemap typemap if_perl.xs  if_perl.c
cl -c /W3 /nologo  -D_MT -MT -I. -Iproto -DHAVE_PATHDEF -DWIN32  
-DFEAT_SNIFF -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG   -DFEAT_XPM_W32   
-DWINVER=0x0500 -D_WIN32_WINNT=0x0500  /Fo.\ObjGOL/ /Ox -DNDEBUG /G6 -DFEAT_OLE 
-DFEAT_MBYTE_IME -DDYNAMIC_IME
-DGLOBAL_IME -DFEAT_MBYTE -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT 
-DFEAT_PERL -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\perl58.dll\ -DFEAT_HUGE /Zi 
/Fd.\ObjGOL/ /I C:\Program Files\ActivePerl\Lib\Core if_perl.c
cl : Command line warning D9002 : ignoring unknown option '/G6'
if_perl.c
if_perl.xs(1075) : error C2275: 'buf_T' : illegal use of this type as an 
expression
c:\software\vim\vim70\src\structs.h(1133) : see declaration of 'buf_T'
if_perl.xs(1075) : error C2065: 'save_curbuf' : undeclared identifier
if_perl.xs(1088) : warning C4047: '=' : 'buf_T *' differs in levels of 
indirection from 'int'
if_perl.xs(1089) : warning C4047: '=' : 'buf_T *' differs in levels of 
indirection from 'int'
if_perl.xs(1187) : error C2275: 'buf_T' : illegal use of this type as an 
expression
c:\software\vim\vim70\src\structs.h(1133) : see declaration of 'buf_T'
if_perl.xs(1200) : warning C4047: '=' : 'buf_T *' differs in levels of 
indirection from 'int'
if_perl.xs(1201) : warning C4047: '=' : 'buf_T *' differs in levels of 
indirection from 'int'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
---%---

I inspected if_perl.xs and if_perl.c and saw that xsubpp simply removed
preprocessor directives such as

 ! #ifdef FEAT_AUTOCMD


out of the code without really make a decision between the #if or #else:
Both parts were left.

I then found

http://perldoc.perl.org/perlxs.html#Inserting-POD%2c-Comments-and-C-Preprocessor-Directives

I will make my patch to get this working

With kind regards

Mathias



Re: Patch 7.0.048

2006-08-08 Thread Bram Moolenaar

James Vega wrote:

 On Tue, Aug 08, 2006 at 08:48:31PM +0200, Bram Moolenaar wrote:
  --- 127,135 
let nmt =3D s:tempname(nm)
if rename(nm, nmt) =3D=3D 0
  if exists(b:gzip_comp_arg)
  !   call system(a:cmd .   . b:gzip_comp_arg .  ' . nmt . ')
  else
  !   call system(a:cmd .  ' . nmt . ')
 
 If the filename itself has single quotes, this will prematurely end the
 quoting.  escape(nmt, ') should probably be used as well.

Escaping the single quotes probably doesn't work.  You end up with
backslashes in the file name.

I tried editing the file  t't.gz  and that worked.  This may depend on
the shell used.

-- 
From know your smileys:
 :-| :-|   Deja' vu!

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Patch (unofficial): if_perl.xs is converted to an invalid if_perl.c file

2006-08-08 Thread Mathias Michaelis
Patch   (after 7.0.44)
Problem:xsubpp simply removes the newly added directives form
if_perl.xs when converting it into if_perl.c
Solution:   See 
http://perldoc.perl.org/perlxs.html#Inserting-POD%2c-Comments-and-C-Preprocessor-Directives


*** ..\vim-7.0.044\src\if_perl.xs   2006-08-08 20:02:34.440876800 +0200
--- src\if_perl.xs  2006-08-08 21:07:26.287076800 +0200
***
*** 1048,1053 
--- 1048,1054 
}
  }

+ #ifdef FEAT_AUTOCMD
  void
  Set(vimbuf, ...)
  VIBUF vimbuf;
***
*** 1068,1102 
line = SvPV(ST(i),PL_na);
if (lnum  0  lnum = vimbuf-b_ml.ml_line_count  line != NULL)
{
- #ifdef FEAT_AUTOCMD
aco_save_T  aco;

/* set curwin/curbuf for vimbuf and save some things */
aucmd_prepbuf(aco, vimbuf);
! #else
buf_T   *save_curbuf = curbuf;

curbuf = vimbuf;
curwin-w_buffer = vimbuf;
- #endif
if (u_savesub(lnum) == OK)
{
ml_replace(lnum, (char_u *)line, TRUE);
changed_bytes(lnum, 0);
}

- #ifdef FEAT_AUTOCMD
-   /* restore curwin/curbuf and a few other things */
-   aucmd_restbuf(aco);
-   /* Careful: autocommands may have made vimbuf invalid! */
- #else
curwin-w_buffer = save_curbuf;
curbuf = save_curbuf;
- #endif
}
}
  }

  void
  Delete(vimbuf, ...)
  VIBUF vimbuf;
--- 1069,1131 
line = SvPV(ST(i),PL_na);
if (lnum  0  lnum = vimbuf-b_ml.ml_line_count  line != NULL)
{
aco_save_T  aco;

/* set curwin/curbuf for vimbuf and save some things */
aucmd_prepbuf(aco, vimbuf);
!   if (u_savesub(lnum) == OK)
!   {
!   ml_replace(lnum, (char_u *)line, TRUE);
!   changed_bytes(lnum, 0);
!   }
!
!   /* restore curwin/curbuf and a few other things */
!   aucmd_restbuf(aco);
!   /* Careful: autocommands may have made vimbuf invalid! */
!   }
!   }
! }
!
! #else
! void
! Set(vimbuf, ...)
! VIBUF vimbuf;
!
! PREINIT:
! int i;
! long lnum;
! char *line;
! PPCODE:
! if (buf_valid(vimbuf))
! {
!   if (items  3)
!   croak(Usage: VIBUF::Set(vimbuf, lnum, @lines));
!
!   lnum = SvIV(ST(1));
!   for(i = 2; i  items; i++, lnum++)
!   {
!   line = SvPV(ST(i),PL_na);
!   if (lnum  0  lnum = vimbuf-b_ml.ml_line_count  line != NULL)
!   {
buf_T   *save_curbuf = curbuf;

curbuf = vimbuf;
curwin-w_buffer = vimbuf;
if (u_savesub(lnum) == OK)
{
ml_replace(lnum, (char_u *)line, TRUE);
changed_bytes(lnum, 0);
}

curwin-w_buffer = save_curbuf;
curbuf = save_curbuf;
}
}
  }

+ #endif
+
+ #ifdef FEAT_AUTOCMD
  void
  Delete(vimbuf, ...)
  VIBUF vimbuf;
***
*** 1130,1144 
if (lnum  0  lnum = vimbuf-b_ml.ml_line_count)
{
buf_T   *save_curbuf = curbuf;
- #ifdef FEAT_AUTOCMD
aco_save_T  aco;

/* set curwin/curbuf for vimbuf and save some things */
aucmd_prepbuf(aco, vimbuf);
- #else
-   curbuf = vimbuf;
-   curwin-w_buffer = vimbuf;
- #endif
if (u_savedel(lnum, 1) == OK)
{
ml_delete(lnum, 0);
--- 1159,1168 
***
*** 1146,1165 
if (save_curbuf == curbuf)
check_cursor();
}
- #ifdef FEAT_AUTOCMD
/* restore curwin/curbuf and a few other things */
aucmd_restbuf(aco);
/* Careful: autocommands may have made vimbuf invalid! */
! #else
curwin-w_buffer = save_curbuf;
curbuf = save_curbuf;
- #endif
update_curbuf(VALID);
}
}
}
  }

  void
  Append(vimbuf, ...)
  VIBUF vimbuf;
--- 1170,1238 
if (save_curbuf == curbuf)
check_cursor();
}
/* restore curwin/curbuf and a few other things */
aucmd_restbuf(aco);
/* Careful: autocommands may have made vimbuf invalid! */
!   update_curbuf(VALID);
!   }
!   }
!   }
! }
!
! #else
! void
! Delete(vimbuf, ...)
! VIBUF vimbuf;
!
! PREINIT:
! long 

Controlling @Spell/@NoSpell

2006-08-08 Thread Nikolai Weibull

In my syntax/context.vim I include a bunch of other syntaxes.  All
work fine except for the xml one, as spell-checking stops working when
it's included.  It seems to be due to the fact that there are items in
the xml syntax that are marked to contain @Spell.  This seems to set
off the default of having everything be spell-checked.  The context
syntax does have a bunch of @NoSpell, however, and other syntaxes
included, such as those for c and ruby, include @Spell containments as
well.  I don't quite understand why this is happening, so perhaps
someone with better knowledge of the @Spell/@NoSpell rules could help
me out.

Also, is there a way to say that spell-checking should be on
everywhere, even though @Spell has been set for some definitions?

Thanks.

 nikolai