updated for version 7.0004
diff --git a/src/GvimExt/Make_ming.mak b/src/GvimExt/Make_ming.mak
index 3456255..9da5639 100644
--- a/src/GvimExt/Make_ming.mak
+++ b/src/GvimExt/Make_ming.mak
@@ -28,8 +28,8 @@
 WINDRES = i386-mingw32msvc-windres
 endif
 else
-CXX := g++.exe
-WINDRES := windres.exe
+CXX := g++
+WINDRES := windres
 CXXFLAGS := -O2 -mno-cygwin
 endif
 LIBS :=  -luuid
diff --git a/src/Make_bc5.mak b/src/Make_bc5.mak
index 73d9440..271820d 100644
--- a/src/Make_bc5.mak
+++ b/src/Make_bc5.mak
@@ -76,6 +76,7 @@
 # CSCOPE	no or yes: include support for Cscope interface (yes)
 # NETBEANS	no or yes: include support for Netbeans interface (yes if GUI
 #		is yes)
+# NBDEBUG 	no or yes: include support for debugging Netbeans interface (no)
 # XPM		define to path to XPM dir to get support for loading XPM images.
 
 ### BOR: root of the BC installation
@@ -397,19 +398,6 @@
 DEFINES = $(DEFINES) -DFEAT_CSCOPE
 !endif
 
-!if ("$(NETBEANS)"=="yes")
-DEFINES = $(DEFINES) -DFEAT_NETBEANS_INTG
-!if ("$(DEBUG)"=="yes")
-DEFINES = $(DEFINES) -DNBDEBUG
-NBDEBUG_DEP = nbdebug.h nbdebug.c
-!endif
-!endif
-
-!ifdef XPM
-DEFINES = $(DEFINES) -DFEAT_XPM_W32
-INCLUDE = $(XPM)\include;$(INCLUDE)
-!endif
-
 !if ("$(GUI)"=="yes")
 DEFINES = $(DEFINES) -DFEAT_GUI_W32 -DFEAT_CLIPBOARD
 !if ("$(DEBUG)"=="yes")
@@ -427,11 +415,13 @@
 LINK2 = -aa
 RESFILE = vim.res
 !else
+!undef NETBEANS
+!undef XPM
+!undef VIMDLL
 !if ("$(DEBUG)"=="yes")
 TARGET = vimd.exe
 !else
 # for now, anyway: VIMDLL is only for the GUI version
-!undef VIMDLL
 TARGET = vim.exe
 !endif
 !if ($(OSTYPE)==DOS16)
@@ -447,6 +437,21 @@
 RESFILE = vim.res
 !endif
 
+!if ("$(NETBEANS)"=="yes")
+DEFINES = $(DEFINES) -DFEAT_NETBEANS_INTG
+!if ("$(NBDEBUG)"=="yes")
+DEFINES = $(DEFINES) -DNBDEBUG
+NBDEBUG_DEP = nbdebug.h nbdebug.c
+!endif
+!endif
+
+!ifdef XPM
+!if ("$(GUI)"=="yes")
+DEFINES = $(DEFINES) -DFEAT_XPM_W32
+INCLUDE = $(XPM)\include;$(INCLUDE)
+!endif
+!endif
+
 !if ("$(USEDLL)"=="yes")
 DEFINES = $(DEFINES) -D_RTLDLL
 !endif
diff --git a/src/Make_cyg.mak b/src/Make_cyg.mak
index e58e3d1..b869230 100644
--- a/src/Make_cyg.mak
+++ b/src/Make_cyg.mak
@@ -1,6 +1,6 @@
 #
 # Makefile for VIM on Win32, using Cygnus gcc
-# Last updated by Dan Sharp.  Last Change: 2004 Apr 23
+# Last updated by Dan Sharp.  Last Change: 2004 Jul 01
 #
 # This compiles Vim as a Windows application.  If you want Vim to run as a
 # Cygwin application use the Makefile (just like on Unix).
@@ -36,6 +36,7 @@
 # OPTIMIZE	SPACE, SPEED, or MAXSPEED: set optimization level (MAXSPEED)
 # NETBEANS	no or yes: to include netbeans interface support (yes when GUI
 #		is yes)
+# NBDEBUG 	no or yes: to include netbeans interface debugging support (no)
 # XPM		define to path to XPM dir to get XPM image support (not defined)
 #>>>>> choose options:
 ifndef GUI
@@ -62,14 +63,16 @@
 IME = yes
 endif
 
-ifndef CPUNR
-CPUNR = i386
-endif
-
 ifndef ARCH
 ARCH = i386
 endif
 
+ifndef CPUNR
+# Setting -march implicitly sets -mcpu to the same value,
+# so reflect that in the defaults here.
+CPUNR = $(ARCH)
+endif
+
 ifndef WINVER
 WINVER = 0x0400
 endif
@@ -293,12 +296,16 @@
 endif
 
 ##############################
+ifeq ($(GUI),yes)
+
+##############################
 ifeq (yes, $(NETBEANS))
+# Only allow NETBEANS for a GUI build.
 DEFINES += -DFEAT_NETBEANS_INTG
 EXTRA_OBJS += $(OUTDIR)/netbeans.o $(OUTDIR)/gui_beval.o
 EXTRA_LIBS += -lwsock32
 
-ifeq (yes, $(DEBUG))
+ifeq (yes, $(NBDEBUG))
 DEFINES += -DNBDEBUG
 NBDEBUG_DEP = nbdebug.h nbdebug.c
 endif
@@ -307,6 +314,7 @@
 
 ##############################
 ifdef XPM
+# Only allow XPM for a GUI build.
 DEFINES += -DFEAT_XPM_W32
 INCLUDES += -I$(XPM)/include
 EXTRA_OBJS += $(OUTDIR)/xpm_w32.o
@@ -314,14 +322,6 @@
 endif
 
 ##############################
-ifeq (yes, $(OLE))
-DEFINES += -DFEAT_OLE
-EXTRA_OBJS += $(OUTDIR)/if_ole.o
-EXTRA_LIBS += -loleaut32 -lstdc++
-endif
-
-##############################
-ifeq ($(GUI),yes)
 EXE = gvim$(DEBUG_SUFFIX).exe
 OUTDIR = gobj$(DEBUG_SUFFIX)
 DEFINES += -DFEAT_GUI_W32 -DFEAT_CLIPBOARD
@@ -334,6 +334,13 @@
 endif
 
 ##############################
+ifeq (yes, $(OLE))
+DEFINES += -DFEAT_OLE
+EXTRA_OBJS += $(OUTDIR)/if_ole.o
+EXTRA_LIBS += -loleaut32 -lstdc++
+endif
+
+##############################
 ifneq (sh.exe, $(SHELL))
 DEL = rm
 DIRSLASH = /
diff --git a/src/Make_ming.mak b/src/Make_ming.mak
index 0678062..31cd92c 100644
--- a/src/Make_ming.mak
+++ b/src/Make_ming.mak
@@ -287,17 +287,24 @@
 endif
 
 ifeq ($(NETBEANS),yes)
+# Only allow NETBEANS for a GUI build.
+ifeq (yes, $(GUI))
 DEFINES += -DFEAT_NETBEANS_INTG
-ifeq ($(DEBUG), yes)
+
+ifeq ($(NBDEBUG), yes)
 DEFINES += -DNBDEBUG
 NBDEBUG_INCL = nbdebug.h
 NBDEBUG_SRC = nbdebug.c
 endif
 endif
+endif
 
 ifdef XPM
+# Only allow XPM for a GUI build.
+ifeq (yes, $(GUI))
 CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include
 endif
+endif
 
 ifeq ($(DEBUG),yes)
 CFLAGS += -g -fstack-check
@@ -378,14 +385,20 @@
 OBJ += $(OUTDIR)/if_cscope.o
 endif
 ifeq ($(NETBEANS),yes)
+# Only allow NETBEANS for a GUI build.
+ifeq (yes, $(GUI))
 OBJ += $(OUTDIR)/netbeans.o $(OUTDIR)/gui_beval.o
 LIB += -lwsock32
 endif
+endif
 ifdef XPM
+# Only allow XPM for a GUI build.
+ifeq (yes, $(GUI))
 OBJ += $(OUTDIR)/xpm_w32.o
 # You'll need libXpm.a from http://gnuwin32.sf.net
 LIB += -L $(XPM)/lib -lXpm
 endif
+endif
 
 
 ifeq ($(GUI),yes)
diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak
index 8ee77b6..d4b74a4 100644
--- a/src/Make_mvc.mak
+++ b/src/Make_mvc.mak
@@ -57,6 +57,7 @@
 #       Processor Version: CPUNR=[i386, i486, i586, i686] (default is i386)
 #       Optimization: OPTIMIZE=[SPACE, SPEED, MAXSPEED] (default is MAXSPEED)
 #       Netbeans Support: NETBEANS=[yes or no] (default is yes if GUI is yes)
+#       Netbeans Debugging Support: NBDEBUG=[yes or no] (default is no)
 #       XPM Image Support: XPM=[path to XPM directory]
 #
 # You can combine any of these interfaces
@@ -189,12 +190,15 @@
 NETBEANS = $(GUI)
 !endif
 
+# Only allow NETBEANS and XPM for a GUI build.
+!if "$(GUI)" == "yes"
 !if "$(NETBEANS)" == "yes"
 # NETBEANS - Include support for Netbeans integration
 NETBEANS_PRO	= proto/netbeans.pro
 NETBEANS_OBJ	= $(OBJDIR)/netbeans.obj $(OBJDIR)/gui_beval.obj
 NETBEANS_DEFS	= -DFEAT_NETBEANS_INTG
-!if "$(DEBUG)" == "yes"
+
+!if "$(NBDEBUG)" == "yes"
 NBDEBUG_DEFS	= -DNBDEBUG
 NBDEBUG_INCL	= nbdebug.h
 NBDEBUG_SRC	= nbdebug.c
@@ -210,6 +214,7 @@
 XPM_LIB   = $(XPM)\lib\libXpm.lib
 XPM_INC	  = -I $(XPM)\include
 !endif
+!endif
 
 !if defined(USE_MSVCRT)
 CVARS = $(cvarsdll)
diff --git a/src/Makefile b/src/Makefile
index 7e4c385..e19dabc 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -336,7 +336,6 @@
 # use it (e.g., want a GTK-only version), then use --enable-gui=gtk.
 #
 # If the selected GUI isn't found, the GUI is disabled automatically
-#CONF_OPT_GUI = --enable-gui=kde
 #CONF_OPT_GUI = --enable-gui=gtk
 #CONF_OPT_GUI = --enable-gui=gtk --disable-gtktest
 #CONF_OPT_GUI = --enable-gui=gtk2
@@ -344,6 +343,7 @@
 #CONF_OPT_GUI = --enable-gui=gnome
 #CONF_OPT_GUI = --enable-gui=gnome2
 #CONF_OPT_GUI = --enable-gui=gnome2 --disable-gtktest
+#CONF_OPT_GUI = --enable-gui=kde
 #CONF_OPT_GUI = --enable-gui=motif
 #CONF_OPT_GUI = --enable-gui=motif --with-motif-lib="-static -lXm -shared"
 #CONF_OPT_GUI = --enable-gui=athena
diff --git a/src/buffer.c b/src/buffer.c
index 27f64bd..6249005 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1668,6 +1668,9 @@
 #ifdef FEAT_INS_EXPAND
     clear_string_option(&buf->b_p_cpt);
 #endif
+#ifdef FEAT_COMPL_FUNC
+    clear_string_option(&buf->b_p_cfu);
+#endif
 #ifdef FEAT_QUICKFIX
     clear_string_option(&buf->b_p_gp);
     clear_string_option(&buf->b_p_mp);
@@ -1680,6 +1683,9 @@
     clear_string_option(&buf->b_p_dict);
     clear_string_option(&buf->b_p_tsr);
 #endif
+#ifdef FEAT_TEXTOBJ
+    clear_string_option(&buf->b_p_qe);
+#endif
     buf->b_p_ar = -1;
 }
 
diff --git a/src/configure.in b/src/configure.in
index 1ebf82c..42d6bfa 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -1251,7 +1251,10 @@
 		  KDE_LIBS="$KDE_PREFIX/lib"
 		fi
 		if test "x$KDE_INCLUDES" = "x"; then
-			KDE_INCLUDES="$KDE_PREFIX/include"
+		  KDE_INCLUDES="$KDE_PREFIX/include"
+		  if test -d "$KDE_INCLUDES/kde"; then
+		    KDE_INCLUDES="$KDE_INCLUDES/kde"
+		  fi
 		fi
 		kde_major_version=`$KDE_CONFIG --version | grep KDE | \
 sed 's/KDE:\ //' | sed 's/\([[0-9]]*\).\([[0-9]]*.*\)/\1/'`
diff --git a/src/edit.c b/src/edit.c
index 1adcda4..0ca698c 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -30,6 +30,7 @@
 #define CTRL_X_DICTIONARY	(9 + CTRL_X_WANT_IDENT)
 #define CTRL_X_THESAURUS	(10 + CTRL_X_WANT_IDENT)
 #define CTRL_X_CMDLINE		11
+#define CTRL_X_FUNCTION		12
 
 #define CHECK_KEYS_TIME		30
 
@@ -38,7 +39,7 @@
 static char *ctrl_x_msgs[] =
 {
     N_(" Keyword completion (^N^P)"), /* ctrl_x_mode == 0, ^P/^N compl. */
-    N_(" ^X mode (^E^Y^L^]^F^I^K^D^V^N^P)"),
+    N_(" ^X mode (^E^Y^L^]^F^I^K^D^U^V^N^P)"),
     /* Scroll has it's own msgs, in it's place there is the msg for local
      * ctrl_x_mode = 0 (eg continue_status & CONT_LOCAL)  -- Acevedo */
     N_(" Keyword Local completion (^N^P)"),
@@ -50,7 +51,8 @@
     NULL,
     N_(" Dictionary completion (^K^N^P)"),
     N_(" Thesaurus completion (^T^N^P)"),
-    N_(" Command-line completion (^V^N^P)")
+    N_(" Command-line completion (^V^N^P)"),
+    N_(" User defined completion (^U^N^P)"),
 };
 
 static char_u e_hitend[] = N_("Hit end of paragraph");
@@ -762,7 +764,7 @@
 #ifdef FEAT_INS_EXPAND
 	/* Enter CTRL-X mode */
 	case Ctrl_X:
-	    /* CTRL-X after CTRL-V CTRL-X doesn't do anything, so that CTRL-X
+	    /* CTRL-X after CTRL-X CTRL-V doesn't do anything, so that CTRL-X
 	     * CTRL-V works like CTRL-N */
 	    if (ctrl_x_mode != CTRL_X_CMDLINE)
 	    {
@@ -1030,6 +1032,12 @@
 
 	/* delete all inserted text in current line */
 	case Ctrl_U:
+# ifdef FEAT_COMPL_FUNC
+	    /* CTRL-X CTRL-U completes with 'completefunc'. */
+	    if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET
+					  || ctrl_x_mode == CTRL_X_FUNCTION)
+		goto docomplete;
+# endif
 	    did_backspace = ins_bs(c, BACKSPACE_LINE, &inserted_space);
 	    auto_format(FALSE, TRUE);
 	    inserted_space = FALSE;
@@ -1914,6 +1922,10 @@
 	case CTRL_X_CMDLINE:
 	    return (c == Ctrl_V || c == Ctrl_Q || c == Ctrl_P || c == Ctrl_N
 		    || c == Ctrl_X);
+#ifdef FEAT_COMPL_FUNC
+	case CTRL_X_FUNCTION:
+	    return (c == Ctrl_U || c == Ctrl_P || c == Ctrl_N || c == Ctrl_X);
+#endif
     }
     EMSG(_(e_internal));
     return FALSE;
@@ -2416,6 +2428,11 @@
 	    case Ctrl_T:
 		ctrl_x_mode = CTRL_X_THESAURUS;
 		break;
+#ifdef FEAT_COMPL_FUNC
+	    case Ctrl_U:
+		ctrl_x_mode = CTRL_X_FUNCTION;
+		break;
+#endif
 	    case Ctrl_RSB:
 		ctrl_x_mode = CTRL_X_TAGS;
 		break;
@@ -2622,6 +2639,88 @@
     return buf;
 }
 
+#ifdef FEAT_COMPL_FUNC
+static char_u *call_completefunc __ARGS((char_u *line, char_u *base, int col, int preproc));
+static int expand_by_function __ARGS((int lnum, int col, char_u *base, char_u ***matches));
+
+/*
+ * Execute user defined complete function 'completefunc'.
+ * Return NULL if some error occurs.
+ */
+    static char_u *
+call_completefunc(line, base, col, preproc)
+    char_u	*line;
+    char_u	*base;
+    int		col;
+    int		preproc;
+{
+    char_u	colbuf[30];
+    char_u	*args[4];
+
+    /* Return NULL when 'completefunc' isn't set. */
+    if (*curbuf->b_p_cfu == NUL)
+	return NULL;
+
+    sprintf((char *)colbuf, "%d", col + (base ? (int)STRLEN(base) : 0));
+    args[0] = line;
+    args[1] = base;
+    args[2] = colbuf;
+    args[3] = preproc ? "1" : "0";
+    return call_vim_function(curbuf->b_p_cfu, 4, args, FALSE);
+}
+
+/*
+ * Execute user defined complete function 'completefunc', and get candidates
+ * are separeted with "\n".  Return value is number of candidates and array
+ * of candidates as "matches".
+ */
+    static int
+expand_by_function(lnum, col, base, matches)
+    int		lnum;
+    int		col;
+    char_u	*base;
+    char_u	***matches;
+{
+    char_u	*matchstr = NULL;
+
+    /* Execute 'completefunc' and get the result */
+    matchstr = call_completefunc(ml_get_buf(curbuf, lnum, FALSE), base, col, 0);
+
+    /* Parse returned string */
+    if (matchstr != NULL)
+    {
+	garray_T    ga;
+	char_u	    *p, *pnext;
+
+	ga_init2(&ga, (int)sizeof(char*), 8);
+	for (p = matchstr; *p != NUL; p = pnext)
+	{
+	    int len;
+
+	    pnext = vim_strchr(p, '\n');
+	    if (pnext == NULL)
+		pnext = p + STRLEN(p);
+	    len = pnext - p;
+	    if (len > 0)
+	    {
+		if (ga_grow(&ga, 1) == FAIL)
+		    break;
+		((char_u **)ga.ga_data)[ga.ga_len] = vim_strnsave(p, len);
+		++ga.ga_len;
+		--ga.ga_room;
+	    }
+	    if (*pnext != NUL)
+		++pnext;
+	}
+	vim_free(matchstr);
+	if (ga.ga_len > 0)
+	    *matches = (char_u**)ga.ga_data;
+	return ga.ga_len;
+    }
+    return 0;
+}
+#endif /* FEAT_COMPL_FUNC */
+
 /*
  * Get the next expansion(s) for the text starting at the initial curbuf
  * position "ini" and in the direction dir.
@@ -2660,7 +2759,8 @@
 	    ins_buf->b_scanned = 0;
 	found_all = FALSE;
 	ins_buf = curbuf;
-	e_cpt = continue_status & CONT_LOCAL ? (char_u *)"." : curbuf->b_p_cpt;
+	e_cpt = (continue_status & CONT_LOCAL)
+					    ? (char_u *)"." : curbuf->b_p_cpt;
 	last_match_pos = first_match_pos = *ini;
     }
 
@@ -2828,6 +2928,15 @@
 		ins_compl_add_matches(num_matches, matches, dir);
 	    break;
 
+#ifdef FEAT_COMPL_FUNC
+	case CTRL_X_FUNCTION:
+	    num_matches = expand_by_function(first_match_pos.lnum,
+				 first_match_pos.col, complete_pat, &matches);
+	    if (num_matches > 0)
+		ins_compl_add_matches(num_matches, matches, dir);
+	    break;
+#endif
+
 	default:	/* normal ^P/^N and ^X^L */
 	    /*
 	     * If 'infercase' is set, don't use 'smartcase' here
@@ -3404,6 +3513,36 @@
 	    tmp_ptr = line + temp;
 	    temp = complete_col - temp;
 	}
+#ifdef FEAT_COMPL_FUNC
+	else if (ctrl_x_mode == CTRL_X_FUNCTION)
+	{
+	    /*
+	     * Call user defined function 'completefunc' with line content,
+	     * cursor column number and preproc is 1.  Obtain length of text
+	     * to use for completion.
+	     */
+	    char_u  *lenstr;
+	    int	    keeplen = 0;
+
+	    /* Call 'completefunc' and get pattern length as a string */
+	    lenstr = call_completefunc(line, NULL, complete_col, 1);
+	    if (lenstr == NULL)
+		return FAIL;
+	    keeplen = atoi(lenstr);
+	    vim_free(lenstr);
+	    if (keeplen < 0)
+		return FAIL;
+	    if ((colnr_T)keeplen > complete_col)
+		keeplen = complete_col;
+
+	    /* Setup variables for completion */
+	    tmp_ptr = line + keeplen;
+	    temp = complete_col - keeplen;
+	    complete_pat = vim_strnsave(tmp_ptr, temp);
+	    if (complete_pat == NULL)
+		return FAIL;
+	}
+#endif
 	complete_col = (colnr_T) (tmp_ptr - line);
 
 	if (continue_status & CONT_ADDING)
diff --git a/src/eval.c b/src/eval.c
index 5e40515..7ef1398 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -741,6 +741,14 @@
 
     for (i = 0; i < argc; i++)
     {
+	/* Pass a NULL or empty argument as an empty string */
+	if (argv[i] == NULL || *argv[i] == NUL)
+	{
+	    argvars[i].var_type = VAR_STRING;
+	    argvars[i].var_val.var_string = "";
+	    continue;
+	}
+
 	/* Recognize a number argument, the others must be strings. */
 	vim_str2nr(argv[i], NULL, &len, TRUE, TRUE, &n, NULL);
 	if (len != 0 && len == (int)STRLEN(argv[i]))
diff --git a/src/feature.h b/src/feature.h
index 8ebe94f..7bd73e7 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -379,6 +379,13 @@
 #endif
 
 /*
+ *			Insert mode completion with 'completefunc'.
+ */
+#if defined(FEAT_INS_EXPAND) && defined(FEAT_EVAL)
+# define FEAT_COMPL_FUNC
+#endif
+
+/*
  * +user_commands	Allow the user to define his own commands.
  */
 #ifdef FEAT_NORMAL
diff --git a/src/fileio.c b/src/fileio.c
index 92c1e98..240c7e9 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -6628,6 +6628,7 @@
     {"BufWriteCmd",	EVENT_BUFWRITECMD},
     {"CmdwinEnter",	EVENT_CMDWINENTER},
     {"CmdwinLeave",	EVENT_CMDWINLEAVE},
+    {"ColorScheme",	EVENT_COLORSCHEME},
     {"EncodingChanged",	EVENT_ENCODINGCHANGED},
     {"FileEncoding",	EVENT_ENCODINGCHANGED},
     {"CursorHold",	EVENT_CURSORHOLD},
diff --git a/src/globals.h b/src/globals.h
index 8a59f1c..026a3fe 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -1004,6 +1004,7 @@
 EXTERN int	lcs_eol INIT(= '$');
 EXTERN int	lcs_ext INIT(= NUL);
 EXTERN int	lcs_prec INIT(= NUL);
+EXTERN int	lcs_nbsp INIT(= NUL);
 EXTERN int	lcs_tab1 INIT(= NUL);
 EXTERN int	lcs_tab2 INIT(= NUL);
 EXTERN int	lcs_trail INIT(= NUL);
diff --git a/src/if_cscope.c b/src/if_cscope.c
index eec3de8..012e86c 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -434,14 +434,14 @@
     char *flags;
 {
     struct stat statbuf;
-    int ret;
-    char *fname = NULL;
-    char *fname2 = NULL;
-    char *ppath = NULL;
-    int i;
+    int		ret;
+    char	*fname = NULL;
+    char	*fname2 = NULL;
+    char	*ppath = NULL;
+    int		i;
 
     /* get the filename (arg1), expand it, and try to stat it */
-    if ((fname = (char *)alloc(MAXPATHL+1)) == NULL)
+    if ((fname = (char *)alloc(MAXPATHL + 1)) == NULL)
 	goto add_err;
 
     expand_env((char_u *)arg1, (char_u *)fname, MAXPATHL);
@@ -459,7 +459,7 @@
     {
 	struct stat statbuf2;
 
-	if ((ppath = (char *)alloc(MAXPATHL+1)) == NULL)
+	if ((ppath = (char *)alloc(MAXPATHL + 1)) == NULL)
 	    goto add_err;
 
 	expand_env((char_u *)arg2, (char_u *)ppath, MAXPATHL);
diff --git a/src/normal.c b/src/normal.c
index 8fb8c02..330356c 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -8257,6 +8257,12 @@
 	case 's': /* "as" = a sentence */
 		flag = current_sent(cap->oap, cap->count1, include);
 		break;
+	case '"': /* "a"" = a double quoted string */
+	case '\'': /* "a'" = a single quoted string */
+	case '`': /* "a`" = a backtick quoted string */
+		flag = current_quote(cap->oap, cap->count1, include,
+								  cap->nchar);
+		break;
 #if 0	/* TODO */
 	case 'S': /* "aS" = a section */
 	case 'f': /* "af" = a filename */
diff --git a/src/option.c b/src/option.c
index 948018d..d48c840 100644
--- a/src/option.c
+++ b/src/option.c
@@ -62,6 +62,7 @@
     , PV_CMS
     , PV_COM
     , PV_CPT
+    , PV_CFU
     , PV_DEF
     , PV_DICT
     , PV_DIFF
@@ -109,6 +110,7 @@
     , PV_PATH
     , PV_PI
     , PV_PVW
+    , PV_QE
     , PV_RL
     , PV_RLC
     , PV_RO
@@ -169,6 +171,9 @@
 #ifdef FEAT_INS_EXPAND
 static char_u	*p_cpt;
 #endif
+#ifdef FEAT_COMPL_FUNC
+static char_u	*p_cfu;
+#endif
 static int	p_eol;
 static int	p_et;
 #ifdef FEAT_MBYTE
@@ -205,6 +210,9 @@
 static char_u	*p_oft;
 #endif
 static int	p_pi;
+#ifdef FEAT_TEXTOBJ
+static char_u	*p_qe;
+#endif
 static int	p_ro;
 #ifdef FEAT_SMARTINDENT
 static int	p_si;
@@ -624,6 +632,15 @@
 			    {(char_u *)0L, (char_u *)0L}
 #endif
 			    },
+    {"completefunc", "cfu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE,
+#ifdef FEAT_COMPL_FUNC
+			    (char_u *)&p_cfu, PV_CFU,
+			    {(char_u *)"", (char_u *)0L}
+#else
+			    (char_u *)NULL, PV_NONE,
+			    {(char_u *)0L, (char_u *)0L}
+#endif
+			    },
     {"confirm",     "cf",   P_BOOL|P_VI_DEF,
 #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
 			    (char_u *)&p_confirm, PV_NONE,
@@ -1658,6 +1675,15 @@
     {"prompt",	    NULL,   P_BOOL|P_VI_DEF,
 			    (char_u *)NULL, PV_NONE,
 			    {(char_u *)FALSE, (char_u *)0L}},
+    {"quoteescape", "qe",   P_STRING|P_ALLOCED|P_VI_DEF,
+#ifdef FEAT_TEXTOBJ
+			    (char_u *)&p_qe, PV_QE,
+			    {(char_u *)"\\", (char_u *)0L}
+#else
+			    (char_u *)NULL, PV_NONE,
+			    {(char_u *)NULL, (char_u *)0L}
+#endif
+			    },
     {"readonly",    "ro",   P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB,
 			    (char_u *)&p_ro, PV_RO,
 			    {(char_u *)FALSE, (char_u *)0L}},
@@ -4375,6 +4401,9 @@
     check_string_option(&buf->b_p_cms);
 #endif
     check_string_option(&buf->b_p_nf);
+#ifdef FEAT_TEXTOBJ
+    check_string_option(&buf->b_p_qe);
+#endif
 #ifdef FEAT_SYN_HL
     check_string_option(&buf->b_p_syn);
 #endif
@@ -4397,6 +4426,9 @@
 #ifdef FEAT_INS_EXPAND
     check_string_option(&buf->b_p_cpt);
 #endif
+#ifdef FEAT_COMPL_FUNC
+    check_string_option(&buf->b_p_cfu);
+#endif
 #ifdef FEAT_KEYMAP
     check_string_option(&buf->b_p_keymap);
 #endif
@@ -5793,6 +5825,7 @@
     {
 	{&lcs_eol,	"eol"},
 	{&lcs_ext,	"extends"},
+	{&lcs_nbsp,	"nbsp"},
 	{&lcs_prec,	"precedes"},
 	{&lcs_tab2,	"tab"},
 	{&lcs_trail,	"trail"},
@@ -7871,6 +7904,9 @@
 #ifdef FEAT_INS_EXPAND
 	case PV_CPT:	return (char_u *)&(curbuf->b_p_cpt);
 #endif
+#ifdef FEAT_COMPL_FUNC
+	case PV_CFU:	return (char_u *)&(curbuf->b_p_cfu);
+#endif
 	case PV_EOL:	return (char_u *)&(curbuf->b_p_eol);
 	case PV_ET:	return (char_u *)&(curbuf->b_p_et);
 #ifdef FEAT_MBYTE
@@ -7909,6 +7945,9 @@
 	case PV_OFT:	return (char_u *)&(curbuf->b_p_oft);
 #endif
 	case PV_PI:	return (char_u *)&(curbuf->b_p_pi);
+#ifdef FEAT_TEXTOBJ
+	case PV_QE:	return (char_u *)&(curbuf->b_p_qe);
+#endif
 	case PV_RO:	return (char_u *)&(curbuf->b_p_ro);
 #ifdef FEAT_SMARTINDENT
 	case PV_SI:	return (char_u *)&(curbuf->b_p_si);
@@ -8173,6 +8212,9 @@
 #ifdef FEAT_INS_EXPAND
 	    buf->b_p_cpt = vim_strsave(p_cpt);
 #endif
+#ifdef FEAT_COMPL_FUNC
+	    buf->b_p_cfu = vim_strsave(p_cfu);
+#endif
 	    buf->b_p_sts = p_sts;
 	    buf->b_p_sts_nopaste = p_sts_nopaste;
 #ifndef SHORT_FNAME
@@ -8256,6 +8298,9 @@
 	    buf->b_p_dict = empty_option;
 	    buf->b_p_tsr = empty_option;
 #endif
+#ifdef FEAT_TEXTOBJ
+	    buf->b_p_qe = vim_strsave(p_qe);
+#endif
 
 	    /*
 	     * Don't copy the options set by ex_help(), use the saved values,
diff --git a/src/os_unix.c b/src/os_unix.c
index 597ca3d..7b9d328 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -5391,6 +5391,7 @@
 {
 # if defined(USE_DLOPEN)
     void	*hinstLib;
+    char	*dlerr = NULL;
 # else
     shl_t	hinstLib;
 # endif
@@ -5407,6 +5408,13 @@
 	    | RTLD_LOCAL
 #  endif
 	    );
+    if (hinstLib == NULL)
+    {
+	/* "dlerr" must be used before dlclose() */
+	dlerr = (char *)dlerror();
+	if (dlerr != NULL)
+	    EMSG2(_("dlerror = \"%s\""), dlerr);
+    }
 # else
     hinstLib = shl_load((const char*)libname, BIND_IMMEDIATE|BIND_VERBOSE, 0L);
 # endif
@@ -5423,6 +5431,7 @@
 	if (SETJMP(lc_jump_env) != 0)
 	{
 	    success = FALSE;
+	    dlerr = NULL;
 	    mch_didjmp();
 	}
 	else
@@ -5435,12 +5444,17 @@
 	    {
 # if defined(USE_DLOPEN)
 		ProcAdd = (STRPROCSTR)dlsym(hinstLib, (const char *)funcname);
+		dlerr = (char *)dlerror();
 # else
 		if (shl_findsym(&hinstLib, (const char *)funcname,
 					TYPE_PROCEDURE, (void *)&ProcAdd) < 0)
 		    ProcAdd = NULL;
 # endif
-		if ((success = (ProcAdd != NULL)))
+		if ((success = (ProcAdd != NULL
+# if defined(USE_DLOPEN)
+			    && dlerr == NULL
+# endif
+			    )))
 		{
 		    if (string_result == NULL)
 			retval_int = ((STRPROCINT)ProcAdd)(argstring);
@@ -5452,12 +5466,17 @@
 	    {
 # if defined(USE_DLOPEN)
 		ProcAddI = (INTPROCSTR)dlsym(hinstLib, (const char *)funcname);
+		dlerr = (char *)dlerror();
 # else
 		if (shl_findsym(&hinstLib, (const char *)funcname,
 				       TYPE_PROCEDURE, (void *)&ProcAddI) < 0)
 		    ProcAddI = NULL;
 # endif
-		if ((success = (ProcAddI != NULL)))
+		if ((success = (ProcAddI != NULL
+# if defined(USE_DLOPEN)
+			    && dlerr == NULL
+# endif
+			    )))
 		{
 		    if (string_result == NULL)
 			retval_int = ((INTPROCINT)ProcAddI)(argint);
@@ -5492,8 +5511,12 @@
 #  endif
 # endif
 
-	/* Free the DLL module. */
 # if defined(USE_DLOPEN)
+	/* "dlerr" must be used before dlclose() */
+	if (dlerr != NULL)
+	    EMSG2(_("dlerror = \"%s\""), dlerr);
+
+	/* Free the DLL module. */
 	(void)dlclose(hinstLib);
 # else
 	(void)shl_unload(hinstLib);
diff --git a/src/proto/search.pro b/src/proto/search.pro
index 194c390..304ad73 100644
--- a/src/proto/search.pro
+++ b/src/proto/search.pro
@@ -26,6 +26,7 @@
 int current_sent __ARGS((oparg_T *oap, long count, int include));
 int current_block __ARGS((oparg_T *oap, long count, int include, int what, int other));
 int current_par __ARGS((oparg_T *oap, long count, int include, int type));
+int current_quote __ARGS((oparg_T *oap, long count, int include, int quotechar));
 int linewhite __ARGS((linenr_T lnum));
 void find_pattern_in_path __ARGS((char_u *ptr, int dir, int len, int whole, int skip_comments, int type, long count, int action, linenr_T start_lnum, linenr_T end_lnum));
 int read_viminfo_search_pattern __ARGS((vir_T *virp, int force));
diff --git a/src/screen.c b/src/screen.c
index 8a5b421..fa3b5d1 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -3549,6 +3549,28 @@
 #endif
 	    ++ptr;
 
+	    /* 'list' : change char 160 to lcs_nbsp. */
+	    if (wp->w_p_list && c == 160 && lcs_nbsp)
+	    {
+		c = lcs_nbsp;
+		if (area_attr == 0 && search_attr == 0)
+		{
+		    n_attr = 1;
+		    extra_attr = hl_attr(HLF_8);
+		    saved_attr2 = char_attr; /* save current attr */
+		}
+#ifdef FEAT_MBYTE
+		mb_c = c;
+		if (enc_utf8 && (*mb_char2len)(c) > 1)
+		{
+		    mb_utf8 = TRUE;
+		    u8c_c1 = u8c_c2 = 0;
+		}
+		else
+		    mb_utf8 = FALSE;
+#endif
+	    }
+
 	    if (extra_check)
 	    {
 #ifdef FEAT_SYN_HL
diff --git a/src/search.c b/src/search.c
index ace8fa8..ddf2feb 100644
--- a/src/search.c
+++ b/src/search.c
@@ -3603,7 +3603,269 @@
 
     return OK;
 }
+
+static int find_next_quote __ARGS((char_u *top_ptr, int col, int quotechar, char_u *escape));
+static int find_prev_quote __ARGS((char_u *line, int col_start, int quotechar, char_u *escape));
+
+/*
+ * Search quote char from string line[col].
+ * Quote character escaped by one of the characters in "escape" is not counted
+ * as a quote.
+ * Returns column number of "quotechar" or -1 when not found.
+ */
+    static int
+find_next_quote(line, col, quotechar, escape)
+    char_u	*line;
+    int		col;
+    int		quotechar;
+    char_u	*escape;	/* escape characters, can be NULL */
+{
+    int		c;
+
+    while (1)
+    {
+	c = line[col];
+	if (c == NUL)
+	    return -1;
+	else if (escape != NULL && vim_strchr(escape, c))
+	    ++col;
+	else if (c == quotechar)
+	    break;
+#ifdef FEAT_MBYTE
+	if (has_mbyte)
+	    col += (*mb_ptr2len_check)(line + col);
+	else
 #endif
+	    ++col;
+    }
+    return col;
+}
+
+/*
+ * Search backwards in "line" from column "col_start" to find "quotechar".
+ * Quote character escaped by one of the characters in "escape" is not counted
+ * as a quote.
+ * Return the found column or zero.
+ */
+    static int
+find_prev_quote(line, col_start, quotechar, escape)
+    char_u	*line;
+    int		col_start;
+    int		quotechar;
+    char_u	*escape;	/* escape characters, can be NULL */
+{
+    int		n;
+
+    while (col_start > 0)
+    {
+	--col_start;
+#ifdef FEAT_MBYTE
+	col_start -= (*mb_head_off)(line, line + col_start);
+#endif
+	n = 0;
+	if (escape != NULL)
+	    while (col_start - n > 0 && vim_strchr(escape,
+					     line[col_start - n - 1]) != NULL)
+	    ++n;
+	if (n & 1)
+	    col_start -= n;	/* uneven number of escape chars, skip it */
+	else if (line[col_start] == quotechar)
+	    break;
+    }
+    return col_start;
+}
+
+/*
+ * Find quote under the cursor, cursor at end.
+ * Returns TRUE if found, else FALSE.
+ */
+    int
+current_quote(oap, count, include, quotechar)
+    oparg_T	*oap;
+    long	count;
+    int		include;	/* TRUE == include quote char */
+    int		quotechar;	/* Quote character */
+{
+    char_u	*line = ml_get_curline();
+    int		col_end;
+    int		col_start = curwin->w_cursor.col;
+    int		inclusive = FALSE;
+#ifdef FEAT_VISUAL
+    int		vis_empty = TRUE;	/* Visual selection <= 1 char */
+    int		vis_bef_curs = FALSE;	/* Visual starts before cursor */
+
+    /* Correct cursor when 'selection' is exclusive */
+    if (VIsual_active)
+    {
+	if (*p_sel == 'e' && vis_bef_curs)
+	    dec_cursor();
+	vis_empty = equalpos(VIsual, curwin->w_cursor);
+	vis_bef_curs = lt(VIsual, curwin->w_cursor);
+    }
+    if (!vis_empty && line[col_start] == quotechar)
+    {
+	/* Already selecting something and on a quote character.  Find the
+	 * next quoted string. */
+	if (vis_bef_curs)
+	{
+	    /* Assume we are on a closing quote: move to after the next
+	     * opening quote. */
+	    col_start = find_next_quote(line, col_start + 1, quotechar, NULL);
+	    if (col_start < 0)
+		return FALSE;
+	    col_end = find_next_quote(line, col_start + 1, quotechar,
+							      curbuf->b_p_qe);
+	    if (col_end < 0)
+	    {
+		/* We were on a starting quote perhaps? */
+		col_end = col_start;
+		col_start = curwin->w_cursor.col;
+	    }
+	}
+	else
+	{
+	    col_end = find_prev_quote(line, col_start, quotechar, NULL);
+	    if (line[col_end] != quotechar)
+		return FALSE;
+	    col_start = find_prev_quote(line, col_end, quotechar,
+							      curbuf->b_p_qe);
+	    if (line[col_start] != quotechar)
+	    {
+		/* We were on an ending quote perhaps? */
+		col_start = col_end;
+		col_end = curwin->w_cursor.col;
+	    }
+	}
+    }
+    else
+#endif
+
+    if (line[col_start] == quotechar
+#ifdef FEAT_VISUAL
+	    || !vis_empty
+#endif
+	    )
+    {
+	int	first_col = col_start;
+
+#ifdef FEAT_VISUAL
+	if (!vis_empty)
+	{
+	    if (vis_bef_curs)
+		first_col = find_next_quote(line, col_start, quotechar, NULL);
+	    else
+		first_col = find_prev_quote(line, col_start, quotechar, NULL);
+	}
+#endif
+	/* The cursor is on a quote, we don't know if it's the opening or
+	 * closing quote.  Search from the start of the line to find out.
+	 * Also do this when there is a Visual area, a' may leave the cursor
+	 * in between two strings. */
+	col_start = 0;
+	while (1)
+	{
+	    /* Find open quote character. */
+	    col_start = find_next_quote(line, col_start, quotechar, NULL);
+	    if (col_start < 0 || col_start > first_col)
+		return FALSE;
+	    /* Find close quote character. */
+	    col_end = find_next_quote(line, col_start + 1, quotechar,
+							      curbuf->b_p_qe);
+	    if (col_end < 0)
+		return FALSE;
+	    /* If is cursor between start and end quote character, it is
+	     * target text object. */
+	    if (col_start <= first_col && first_col <= col_end)
+		break;
+	    col_start = col_end + 1;
+	}
+    }
+    else
+    {
+	/* Search backward for a starting quote. */
+	col_start = find_prev_quote(line, col_start, quotechar, curbuf->b_p_qe);
+	if (line[col_start] != quotechar)
+	{
+	    /* No quote before the cursor, look after the cursor. */
+	    col_start = find_next_quote(line, col_start, quotechar, NULL);
+	    if (col_start < 0)
+		return FALSE;
+	}
+
+	/* Find close quote character. */
+	col_end = find_next_quote(line, col_start + 1, quotechar,
+							      curbuf->b_p_qe);
+	if (col_end < 0)
+	    return FALSE;
+    }
+
+    /* When "include" is TRUE, include spaces after closing quote or before
+     * the starting quote. */
+    if (include)
+    {
+	if (vim_iswhite(line[col_end + 1]))
+	    while (vim_iswhite(line[col_end + 1]))
+		++col_end;
+	else
+	    while (col_start > 0 && vim_iswhite(line[col_start - 1]))
+		--col_start;
+    }
+
+    /* Set start position */
+    if (!include)
+	++col_start;
+    curwin->w_cursor.col = col_start;
+#ifdef FEAT_VISUAL
+    if (VIsual_active)
+    {
+	if (vis_empty)
+	{
+	    VIsual = curwin->w_cursor;
+	    redraw_curbuf_later(INVERTED);
+	}
+    }
+    else
+#endif
+    {
+	oap->start = curwin->w_cursor;
+	oap->motion_type = MCHAR;
+    }
+
+    /* Set end position. */
+    curwin->w_cursor.col = col_end;
+    if (include && inc_cursor() == 2)
+	inclusive = TRUE;
+#ifdef FEAT_VISUAL
+    if (VIsual_active)
+    {
+	if (vis_empty || vis_bef_curs)
+	{
+	    /* decrement cursor when 'selection' is not exclusive */
+	    if (*p_sel != 'e')
+		dec_cursor();
+	}
+	else
+	{
+	    /* Cursor is at start of Visual area. */
+	    curwin->w_cursor.col = col_start;
+	}
+	if (VIsual_mode == 'V')
+	{
+	    VIsual_mode = 'v';
+	    redraw_cmdline = TRUE;		/* show mode later */
+	}
+    }
+    else
+#endif
+    {
+	/* Set inclusive and other oap's flags. */
+	oap->inclusive = inclusive;
+    }
+
+    return OK;
+}
+
+#endif /* FEAT_TEXTOBJ */
 
 #if defined(FEAT_LISP) || defined(FEAT_CINDENT) || defined(FEAT_TEXTOBJ) \
 	|| defined(PROTO)
diff --git a/src/structs.h b/src/structs.h
index 9e6d4e2..c8c448b 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1089,6 +1089,9 @@
 #ifdef FEAT_INS_EXPAND
     char_u	*b_p_cpt;	/* 'complete' */
 #endif
+#ifdef FEAT_COMPL_FUNC
+    char_u	*b_p_cfu;	/* 'completefunc' */
+#endif
     int		b_p_eol;	/* 'endofline' */
     int		b_p_et;		/* 'expandtab' */
     int		b_p_et_nobin;	/* b_p_et saved for binary mode */
@@ -1129,6 +1132,9 @@
     char_u	*b_p_oft;	/* 'osfiletype' */
 #endif
     int		b_p_pi;		/* 'preserveindent' */
+#ifdef FEAT_TEXTOBJ
+    char_u	*b_p_qe;	/* 'quoteescape' */
+#endif
     int		b_p_ro;		/* 'readonly' */
     long	b_p_sw;		/* 'shiftwidth' */
 #ifndef SHORT_FNAME
diff --git a/src/syntax.c b/src/syntax.c
index 31ff761..a9cb3fb 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -6021,12 +6021,12 @@
 }
 
 /*
- * Load color file "p".
+ * Load color file "name".
  * Return OK for success, FAIL for failure.
  */
     int
-load_colors(p)
-    char_u	*p;
+load_colors(name)
+    char_u	*name;
 {
     char_u	*buf;
     int		retval = FAIL;
@@ -6039,12 +6039,15 @@
 	return OK;
 
     recursive = TRUE;
-    buf = alloc((unsigned)(STRLEN(p) + 12));
+    buf = alloc((unsigned)(STRLEN(name) + 12));
     if (buf != NULL)
     {
-	sprintf((char *)buf, "colors/%s.vim", p);
+	sprintf((char *)buf, "colors/%s.vim", name);
 	retval = cmd_runtime(buf, FALSE);
 	vim_free(buf);
+#ifdef FEAT_AUTOCMD
+	apply_autocmds(EVENT_COLORSCHEME, NULL, NULL, FALSE, curbuf);
+#endif
     }
     recursive = FALSE;
 
diff --git a/src/testdir/Make_amiga.mak b/src/testdir/Make_amiga.mak
index 0970b72..78a4d27 100644
--- a/src/testdir/Make_amiga.mak
+++ b/src/testdir/Make_amiga.mak
@@ -23,7 +23,7 @@
 		test33.out test34.out test35.out test36.out test37.out \
 		test38.out test39.out test40.out test41.out test42.out \
 		test43.out test44.out test45.out test46.out test47.out \
-		test48.out test51.out
+		test48.out test51.out test53.out
 
 .SUFFIXES: .in .out
 
@@ -95,3 +95,4 @@
 test47.out: test47.in
 test48.out: test48.in
 test51.out: test51.in
+test53.out: test53.in
diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak
index b15951e..0dd1a09 100644
--- a/src/testdir/Make_dos.mak
+++ b/src/testdir/Make_dos.mak
@@ -17,7 +17,7 @@
 		test23.out test24.out test28.out test29.out \
 		test35.out test36.out test43.out \
 		test44.out test45.out test46.out test47.out \
-		test48.out test51.out
+		test48.out test51.out test53.out
 
 SCRIPTS =	test3.out test4.out test5.out test6.out test7.out \
 		test8.out test9.out test11.out test13.out test14.out \
diff --git a/src/testdir/Make_os2.mak b/src/testdir/Make_os2.mak
index af58202..f3ce50b 100644
--- a/src/testdir/Make_os2.mak
+++ b/src/testdir/Make_os2.mak
@@ -23,7 +23,7 @@
 		test33.out test34.out test35.out test36.out test37.out \
 		test38.out test39.out test40.out test41.out test42.out \
 		test43.out test44.out test45.out test46.out test47.out \
-		test48.out test51.out
+		test48.out test51.out test53.out
 
 .SUFFIXES: .in .out
 
diff --git a/src/testdir/Make_vms.mms b/src/testdir/Make_vms.mms
index 23b0b26..6819a68 100644
--- a/src/testdir/Make_vms.mms
+++ b/src/testdir/Make_vms.mms
@@ -4,7 +4,7 @@
 # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
 #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
 #
-# Last change:  2004 May 03
+# Last change:  2004 Jul 02
 #
 # This has been tested on VMS 6.2 to 7.2 on DEC Alpha and VAX.
 # Edit the lines in the Configuration section below to select.
@@ -57,7 +57,7 @@
 	 test33.out test34.out test35.out test36.out test37.out \
 	 test38.out test39.out test40.out test41.out test42.out \
 	 test43.out test44.out test45.out test46.out \
-	 test48.out test51.out
+	 test48.out test51.out test53.out
 
 .IFDEF WANT_GUI
 SCRIPT_GUI = test16.out
diff --git a/src/testdir/Makefile b/src/testdir/Makefile
index 7ed97fe..b09db81 100644
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -13,7 +13,7 @@
 		test33.out test34.out test35.out test36.out test37.out \
 		test38.out test39.out test40.out test41.out test42.out \
 		test43.out test44.out test45.out test46.out test47.out \
-		test48.out test49.out test51.out test52.out
+		test48.out test49.out test51.out test52.out test53.out
 
 SCRIPTS_GUI = test16.out
 
diff --git a/src/testdir/test53.in b/src/testdir/test53.in
new file mode 100644
index 0000000..d2c0ad5
--- /dev/null
+++ b/src/testdir/test53.in
@@ -0,0 +1,24 @@
+Tests for string text objects. vim: set ft=vim :
+
+STARTTEST
+:so small.vim
+/^start:/
+da"
+0va'a'rx
+02f`da`
+0fXdi"
+03f'vi'ry
+:set quoteescape=+*-
+di`
+$F"va"oha"i"rz
+:/^start:/,/^end:/wq! test.out
+ENDTEST
+
+start: "wo\"rd\\" foo
+'foo' 'bar' 'piep'
+bla bla `quote` blah
+out " in "noXno"
+"'" 'blah' rep 'buh'
+bla `s*`d-`+++`l**` b`la
+voo "nah" sdf " asdf" sdf " sdf" sd
+end:
diff --git a/src/testdir/test53.ok b/src/testdir/test53.ok
new file mode 100644
index 0000000..577bad1
--- /dev/null
+++ b/src/testdir/test53.ok
@@ -0,0 +1,8 @@
+start: foo
+xxxxxxxxxxxx'piep'
+bla bla blah
+out " in ""
+"'" 'blah'yyyyy'buh'
+bla `` b`la
+voo "zzzzzzzzzzzzzzzzzzzzzzzzzzzzsd
+end:
diff --git a/src/vim.h b/src/vim.h
index d196688..a4c9d59 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1012,6 +1012,7 @@
     EVENT_BUFWRITECMD,		/* write buffer using command */
     EVENT_CMDWINENTER,		/* after entering the cmdline window */
     EVENT_CMDWINLEAVE,		/* before leaving the cmdline window */
+    EVENT_COLORSCHEME,		/* after loading a colorscheme */
     EVENT_FILEAPPENDPOST,	/* after appending to a file */
     EVENT_FILEAPPENDPRE,	/* before appending to a file */
     EVENT_FILEAPPENDCMD,	/* appende to a file using command */