Compare commits

..

11 Commits

Author SHA1 Message Date
Bram Moolenaar
4bfa60812d updated for version 7.2b-017 2008-07-24 17:34:23 +00:00
Bram Moolenaar
15bfa09582 updated for version 7.2b-016 2008-07-24 16:45:38 +00:00
Bram Moolenaar
3a0254090d updated for version 7.2b-015 2008-07-24 15:20:50 +00:00
Bram Moolenaar
01dd60cb91 updated for version 7.2b-014 2008-07-24 14:24:48 +00:00
Bram Moolenaar
688e5f7ee7 updated for version 7.2b-012 2008-07-24 11:51:40 +00:00
Bram Moolenaar
4394bfff3f updated for version 7.2b-011 2008-07-24 11:21:31 +00:00
Bram Moolenaar
01b9a406f0 updated for version 7.2b-010 2008-07-22 16:58:47 +00:00
Bram Moolenaar
a1aed62928 updated for version 7.2b-009 2008-07-18 15:14:43 +00:00
Bram Moolenaar
0ab2c5adfb updated for version 7.2b-008 2008-07-18 10:54:50 +00:00
Bram Moolenaar
9b22871b6e updated for version 7.2b-007 2008-07-18 10:05:58 +00:00
Bram Moolenaar
de1656ec20 updated for version 7.2b-006 2008-07-18 09:26:30 +00:00
16 changed files with 137 additions and 47 deletions

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2008 Jul 08
" Last Change: 2008 Jul 17
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -92,9 +92,9 @@ au BufNewFile,BufRead *.wrm setf acedb
" Ada (83, 9X, 95)
au BufNewFile,BufRead *.adb,*.ads,*.ada setf ada
if has("vms")
au BufNewFile,BufRead *.gpr,*.ada_m,*.adc setf ada
au BufNewFile,BufRead *.gpr,*.ada_m,*.adc setf ada
else
au BufNewFile,BufRead *.gpr setf ada
au BufNewFile,BufRead *.gpr setf ada
endif
" AHDL
@@ -291,6 +291,9 @@ endfunc
" Blank
au BufNewFile,BufRead *.bl setf blank
" Blkid cache file
au BufNewFile,BufRead /etc/blkid.tab,/etc/blkid.tab.old setf xml
" C or lpc
au BufNewFile,BufRead *.c call s:FTlpc()
@@ -739,7 +742,7 @@ au BufNewFile,BufRead *.groovy setf groovy
au BufNewFile,BufRead *.gsp setf gsp
" Group file
au BufNewFile,BufRead /etc/group,/etc/group-,/etc/group.edit,/etc/gshadow,/etc/gshadow-,/etc/gshadow.edit,/var/backups/group.bak,/var/backups/gshadow.bak setf group
au BufNewFile,BufRead /etc/group,/etc/group-,/etc/group.edit,/etc/gshadow,/etc/gshadow-,/etc/gshadow.edit,/var/backups/group.bak,/var/backups/gshadow.bak setf group
" GTK RC
au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc
@@ -800,6 +803,9 @@ au BufNewFile,BufRead *.tmpl setf htmlcheetah
" Host config
au BufNewFile,BufRead /etc/host.conf setf hostconf
" Hosts access
au BufNewFile,BufRead /etc/hosts.allow,/etc/hosts.deny setf hostsaccess
" Hyper Builder
au BufNewFile,BufRead *.hb setf hb
@@ -850,7 +856,7 @@ endfunc
" Indent RC
au BufNewFile,BufRead indentrc setf indentrc
au BufNewFile,BufRead indentrc setf indent
" Inform
au BufNewFile,BufRead *.inf,*.INF setf inform
@@ -1463,6 +1469,9 @@ au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
" Python
au BufNewFile,BufRead *.py,*.pyw setf python
" Quixote (Python-based web framework)
au BufNewFile,BufRead *.ptl setf python
" Radiance
au BufNewFile,BufRead *.rad,*.mat setf radiance
@@ -1561,6 +1570,9 @@ au BufNewFile,BufRead *.rst setf rst
" RTF
au BufNewFile,BufRead *.rtf setf rtf
" Interactive Ruby shell
au BufNewFile,BufRead .irbrc,irbrc setf ruby
" Ruby
au BufNewFile,BufRead *.rb,*.rbw,*.gem,*.gemspec setf ruby

13
src/auto/configure vendored
View File

@@ -3946,7 +3946,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
if test "$enable_darwin" = "yes"; then
MACOSX=yes
OS_EXTRA_SCR="os_macosx.c os_mac_conv.c";
OS_EXTRA_SRC="os_macosx.c os_mac_conv.c";
OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
if test "x$MACARCH" = "xboth"; then
@@ -5114,16 +5114,17 @@ $as_echo "can't find it!" >&6; }
$as_echo_n "(cached) " >&6
else
tmp_mkf="/tmp/Makefile-conf$$"
cat ${PYTHON_CONFDIR}/Makefile - <<'eof' >${tmp_mkf}
pwd=`pwd`
tmp_mkf="$pwd/config-PyMake$$"
cat -- "${PYTHON_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
__:
@echo "python_MODLIBS='$(MODLIBS)'"
@echo "python_LIBS='$(LIBS)'"
@echo "python_SYSLIBS='$(SYSLIBS)'"
@echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
eof
eval "`cd ${PYTHON_CONFDIR} && make -f ${tmp_mkf} __ | sed '/ directory /d'`"
rm -f ${tmp_mkf}
eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
rm -f -- "${tmp_mkf}"
if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
vi_cv_path_python_plibs="-framework Python"
@@ -5598,7 +5599,7 @@ $as_echo_n "checking for location of tclConfig.sh script... " >&6; }
$as_echo "$try/tclConfig.sh" >&6; }
. $try/tclConfig.sh
TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
TCL_DEFS=`echo $TCL_DEFS | sed -e 's/\\\\ /\\\\X/g' | tr ' ' '\012' | sed -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr '\012' ' ' | sed -e 's/\\\\X/\\\\ /g'`
TCL_DEFS=`echo $TCL_DEFS | sed -e 's/\\\\ /\\\\X/g' | tr ' ' '\012' | sed -e '/^[^-]/d' -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr '\012' ' ' | sed -e 's/\\\\X/\\\\ /g'`
break
fi
done

View File

@@ -152,7 +152,7 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
if test "$enable_darwin" = "yes"; then
MACOSX=yes
OS_EXTRA_SCR="os_macosx.c os_mac_conv.c";
OS_EXTRA_SRC="os_macosx.c os_mac_conv.c";
OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
dnl TODO: use -arch i386 on Intel machines
CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
@@ -678,8 +678,9 @@ if test "$enable_pythoninterp" = "yes"; then
dnl see what the interpreter is built from
AC_CACHE_VAL(vi_cv_path_python_plibs,
[
tmp_mkf="/tmp/Makefile-conf$$"
cat ${PYTHON_CONFDIR}/Makefile - <<'eof' >${tmp_mkf}
pwd=`pwd`
tmp_mkf="$pwd/config-PyMake$$"
cat -- "${PYTHON_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
__:
@echo "python_MODLIBS='$(MODLIBS)'"
@echo "python_LIBS='$(LIBS)'"
@@ -687,8 +688,8 @@ __:
@echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
eof
dnl -- delete the lines from make about Entering/Leaving directory
eval "`cd ${PYTHON_CONFDIR} && make -f ${tmp_mkf} __ | sed '/ directory /d'`"
rm -f ${tmp_mkf}
eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
rm -f -- "${tmp_mkf}"
if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
vi_cv_path_python_plibs="-framework Python"
@@ -866,7 +867,7 @@ if test "$enable_tclinterp" = "yes"; then
TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
dnl Use $TCL_DEFS for -D_THREAD_SAFE et al. But only use the
dnl "-D_ABC" items. Watch out for -DFOO=long\ long.
TCL_DEFS=`echo $TCL_DEFS | sed -e 's/\\\\ /\\\\X/g' | tr ' ' '\012' | sed -e '/^-[[^D]]/d' -e '/-D[[^_]]/d' -e 's/-D_/ -D_/' | tr '\012' ' ' | sed -e 's/\\\\X/\\\\ /g'`
TCL_DEFS=`echo $TCL_DEFS | sed -e 's/\\\\ /\\\\X/g' | tr ' ' '\012' | sed -e '/^[[^-]]/d' -e '/^-[[^D]]/d' -e '/-D[[^_]]/d' -e 's/-D_/ -D_/' | tr '\012' ' ' | sed -e 's/\\\\X/\\\\ /g'`
break
fi
done

View File

@@ -18073,7 +18073,6 @@ get_vim_var_nr(idx)
return vimvars[idx].vv_nr;
}
#if defined(FEAT_AUTOCMD) || defined(PROTO)
/*
* Get string v: variable value. Uses a static buffer, can only be used once.
*/
@@ -18083,7 +18082,6 @@ get_vim_var_str(idx)
{
return get_tv_string(&vimvars[idx].vv_tv);
}
#endif
/*
* Set v:count, v:count1 and v:prevcount.

View File

@@ -3141,10 +3141,11 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags)
#ifdef FEAT_BROWSE
if (cmdmod.browse)
{
# ifdef FEAT_AUTOCMD
if (
# ifdef FEAT_GUI
# ifdef FEAT_GUI
!gui.in_use &&
# endif
# endif
au_has_group((char_u *)"FileExplorer"))
{
/* No browsing supported but we do have the file explorer:
@@ -3153,6 +3154,7 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags)
ffname = (char_u *)".";
}
else
# endif
{
browse_file = do_browse(0, (char_u *)_("Edit File"), ffname,
NULL, NULL, NULL, curbuf);

View File

@@ -7095,10 +7095,11 @@ ex_splitview(eap)
# endif
&& eap->cmdidx != CMD_new)
{
# ifdef FEAT_AUTOCMD
if (
# ifdef FEAT_GUI
# ifdef FEAT_GUI
!gui.in_use &&
# endif
# endif
au_has_group((char_u *)"FileExplorer"))
{
/* No browsing supported but we do have the file explorer:
@@ -7107,6 +7108,7 @@ ex_splitview(eap)
eap->arg = (char_u *)".";
}
else
# endif
{
fname = do_browse(0, (char_u *)_("Edit File in new window"),
eap->arg, NULL, NULL, NULL, curbuf);

View File

@@ -4539,7 +4539,7 @@ makemap(fd, buf)
buf_T *buf; /* buffer for local mappings or NULL */
{
mapblock_T *mp;
char_u c1, c2;
char_u c1, c2, c3;
char_u *p;
char *cmd;
int abbr;
@@ -4592,8 +4592,12 @@ makemap(fd, buf)
if (*p != NUL)
continue;
/* It's possible to create a mapping and then ":unmap" certain
* modes. We recreate this here by mapping the individual
* modes, which requires up to three of them. */
c1 = NUL;
c2 = NUL;
c3 = NUL;
if (abbr)
cmd = "abbr";
else
@@ -4605,9 +4609,6 @@ makemap(fd, buf)
case NORMAL:
c1 = 'n';
break;
case VISUAL + SELECTMODE:
c1 = 'v';
break;
case VISUAL:
c1 = 'x';
break;
@@ -4617,18 +4618,47 @@ makemap(fd, buf)
case OP_PENDING:
c1 = 'o';
break;
case NORMAL + VISUAL:
c1 = 'n';
c2 = 'x';
break;
case NORMAL + SELECTMODE:
c1 = 'n';
c2 = 's';
break;
case NORMAL + OP_PENDING:
c1 = 'n';
c2 = 'o';
break;
case VISUAL + SELECTMODE:
c1 = 'v';
break;
case VISUAL + OP_PENDING:
c1 = 'x';
c2 = 'o';
break;
case SELECTMODE + OP_PENDING:
c1 = 's';
c2 = 'o';
break;
case NORMAL + VISUAL + SELECTMODE:
c1 = 'n';
c2 = 'v';
break;
case NORMAL + VISUAL + OP_PENDING:
c1 = 'n';
c2 = 'x';
c3 = 'o';
break;
case NORMAL + SELECTMODE + OP_PENDING:
c1 = 'n';
c2 = 's';
c3 = 'o';
break;
case VISUAL + SELECTMODE + OP_PENDING:
c1 = 'v';
c2 = 'o';
break;
case NORMAL + OP_PENDING:
c1 = 'n';
c2 = 'o';
break;
case CMDLINE + INSERT:
if (!abbr)
cmd = "map!";
@@ -4646,7 +4676,7 @@ makemap(fd, buf)
EMSG(_("E228: makemap: Illegal mode"));
return FAIL;
}
do /* may do this twice if c2 is set */
do /* do this twice if c2 is set, 3 times with c3 */
{
/* When outputting <> form, need to make sure that 'cpo'
* is set to the Vim default. */
@@ -4693,9 +4723,9 @@ makemap(fd, buf)
|| put_eol(fd) < 0)
return FAIL;
c1 = c2;
c2 = NUL;
}
while (c1);
c2 = c3;
c3 = NUL;
} while (c1 != NUL);
}
}

View File

@@ -843,6 +843,12 @@ err:
}
}
#ifndef FEAT_WINDOWS
int win_valid(win_T *w) { return TRUE; }
int win_count() { return 1; }
win_T *win_find_nr(int n) { return curwin; }
#endif
XS(XS_VIM_Msg);
XS(XS_VIM_SetOption);
XS(XS_VIM_DoCommand);

View File

@@ -1120,6 +1120,7 @@ VimCommand(PyObject *self, PyObject *args)
return result;
}
#ifdef FEAT_EVAL
/*
* Function to translate a typval_T into a PyObject; this will recursively
* translate lists/dictionaries into their Python equivalents.
@@ -1162,7 +1163,7 @@ VimToPython(typval_T *our_tv, int depth, PyObject *lookupDict)
result = Py_BuildValue("s", buf);
PyDict_SetItemString(lookupDict, ptrBuf, result);
}
#ifdef FEAT_FLOAT
# ifdef FEAT_FLOAT
else if (our_tv->v_type == VAR_FLOAT)
{
char buf[NUMBUFLEN];
@@ -1171,7 +1172,7 @@ VimToPython(typval_T *our_tv, int depth, PyObject *lookupDict)
result = Py_BuildValue("s", buf);
PyDict_SetItemString(lookupDict, ptrBuf, result);
}
#endif
# endif
else if (our_tv->v_type == VAR_LIST)
{
list_T *list = our_tv->vval.v_list;
@@ -1224,6 +1225,7 @@ VimToPython(typval_T *our_tv, int depth, PyObject *lookupDict)
return result;
}
#endif
/*ARGSUSED*/
static PyObject *

View File

@@ -2245,7 +2245,12 @@ scripterror:
/* Remember this argument has been added to the argument list.
* Needed when 'encoding' is changed. */
used_file_arg(argv[0], parmp->literal, parmp->full_path,
parmp->diff_mode);
# ifdef FEAT_DIFF
parmp->diff_mode
# else
FALSE
# endif
);
}
#endif
}
@@ -2524,7 +2529,6 @@ edit_buffers(parmp)
int arg_idx; /* index in argument list */
int i;
int advance = TRUE;
buf_T *old_curbuf;
# ifdef FEAT_AUTOCMD
/*
@@ -2577,21 +2581,26 @@ edit_buffers(parmp)
curwin->w_arg_idx = arg_idx;
/* Edit file from arg list, if there is one. When "Quit" selected
* at the ATTENTION prompt close the window. */
old_curbuf = curbuf;
# ifdef HAS_SWAP_EXISTS_ACTION
swap_exists_did_quit = FALSE;
# endif
(void)do_ecmd(0, arg_idx < GARGCOUNT
? alist_name(&GARGLIST[arg_idx]) : NULL,
NULL, NULL, ECMD_LASTL, ECMD_HIDE);
if (curbuf == old_curbuf)
# ifdef HAS_SWAP_EXISTS_ACTION
if (swap_exists_did_quit)
{
/* abort or quit selected */
if (got_int || only_one_window())
{
/* abort selected or quit and only one window */
/* abort selected and only one window */
did_emsg = FALSE; /* avoid hit-enter prompt */
getout(1);
}
win_close(curwin, TRUE);
advance = FALSE;
}
# endif
if (arg_idx == GARGCOUNT - 1)
arg_had_last = TRUE;
++arg_idx;

View File

@@ -8622,8 +8622,9 @@ makeset(fd, opt_flags, local_only)
# endif
# endif
# if defined(FEAT_AUTOCMD)
p->indir == PV_FT)
p->indir == PV_FT
# endif
)
{
if (fprintf(fd, "if &%s != '%s'", p->fullname,
*(char_u **)(varp)) < 0

View File

@@ -2999,14 +2999,14 @@ ex_vimgrep(eap)
char_u *save_ei = NULL;
#endif
aco_save_T aco;
#ifdef FEAT_AUTOCMD
char_u *au_name = NULL;
int flags = 0;
colnr_T col;
long tomatch;
char_u dirname_start[MAXPATHL];
char_u dirname_now[MAXPATHL];
char_u *target_dir = NULL;
#ifdef FEAT_AUTOCMD
char_u *au_name = NULL;
switch (eap->cmdidx)
{

View File

@@ -7140,7 +7140,7 @@ screen_fill(start_row, end_row, start_col, end_col, c1, c2, attr)
* terminal. */
if (mb_fix_col(start_col, row) != start_col)
screen_puts_len((char_u *)" ", 1, row, start_col - 1, 0);
if (mb_fix_col(end_col, row) != end_col)
if (end_col < screen_Columns && mb_fix_col(end_col, row) != end_col)
screen_puts_len((char_u *)" ", 1, row, end_col, 0);
}
#endif

View File

@@ -5375,7 +5375,7 @@ write_viminfo_search_pattern(fp)
(no_hlsearch || find_viminfo_parameter('h') != NULL) ? 'h' : 'H');
#endif
wvsp_one(fp, RE_SEARCH, "", '/');
wvsp_one(fp, RE_SUBST, "Substitute ", '&');
wvsp_one(fp, RE_SUBST, _("Substitute "), '&');
}
}

View File

@@ -3854,6 +3854,8 @@ get_tags(list, pat)
/* Skip field without colon. */
while (*p != NUL && *p >= ' ')
++p;
if (*p == NUL)
break;
}
}
}

View File

@@ -676,6 +676,30 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
17,
/**/
16,
/**/
15,
/**/
14,
/**/
13,
/**/
12,
/**/
11,
/**/
10,
/**/
9,
/**/
8,
/**/
7,
/**/
6,
/**/
5,
/**/