updated for version 7.0037
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 9122ab4..e17e671 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -80,6 +80,8 @@
 static void	alloc_cmdbuff __ARGS((int len));
 static int	realloc_cmdbuff __ARGS((int len));
 static void	draw_cmdline __ARGS((int start, int len));
+static void	save_cmdline __ARGS((struct cmdline_info *ccp));
+static void	restore_cmdline __ARGS((struct cmdline_info *ccp));
 static int	cmdline_paste __ARGS((int regname, int literally));
 #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
 static void	redrawcmd_preedit __ARGS((void));
@@ -593,8 +595,8 @@
 #ifdef FEAT_EVAL
 	    else if (c == 'e')
 	    {
-		struct cmdline_info	    save_ccline;
-		char_u		    *p;
+		struct cmdline_info save_ccline;
+		char_u		    *p = NULL;
 
 		/*
 		 * Replace the command line with the result of an expression.
@@ -605,16 +607,17 @@
 		    new_cmdpos = 99999;	/* keep it at the end */
 		else
 		    new_cmdpos = ccline.cmdpos;
-		save_ccline = ccline;
-		ccline.cmdbuff = NULL;
-		ccline.cmdprompt = NULL;
+
+		save_cmdline(&save_ccline);
 		c = get_expr_register();
-		ccline = save_ccline;
+		restore_cmdline(&save_ccline);
 		if (c == '=')
 		{
+		    save_cmdline(&save_ccline);
 		    p = get_expr_line();
-		    if (p != NULL
-			     && realloc_cmdbuff((int)STRLEN(p) + 1) == OK)
+		    restore_cmdline(&save_ccline);
+
+		    if (p != NULL && realloc_cmdbuff((int)STRLEN(p) + 1) == OK)
 		    {
 			ccline.cmdlen = STRLEN(p);
 			STRCPY(ccline.cmdbuff, p);
@@ -1031,11 +1034,9 @@
 		    }
 		    else
 		    {
-			save_ccline = ccline;
-			ccline.cmdbuff = NULL;
-			ccline.cmdprompt = NULL;
+			save_cmdline(&save_ccline);
 			c = get_expr_register();
-			ccline = save_ccline;
+			restore_cmdline(&save_ccline);
 		    }
 		}
 #endif
@@ -1727,7 +1728,13 @@
     ui_cursor_shape();		/* may show different cursor shape */
 #endif
 
-    return ccline.cmdbuff;
+    {
+	char_u *p = ccline.cmdbuff;
+
+	/* Make ccline empty, getcmdline() may try to use it. */
+	ccline.cmdbuff = NULL;
+	return p;
+    }
 }
 
 #if (defined(FEAT_CRYPT) || defined(FEAT_EVAL)) || defined(PROTO)
@@ -1747,12 +1754,11 @@
     struct cmdline_info	save_ccline;
     int			msg_col_save = msg_col;
 
-    save_ccline = ccline;
-    ccline.cmdbuff = NULL;
+    save_cmdline(&save_ccline);
     ccline.cmdprompt = prompt;
     ccline.cmdattr = attr;
     s = getcmdline(firstc, 1L, 0);
-    ccline = save_ccline;
+    restore_cmdline(&save_ccline);
     /* Restore msg_col, the prompt from input() may have changed it. */
     msg_col = msg_col_save;
 
@@ -2538,6 +2544,40 @@
     return retval;
 }
 
+static struct cmdline_info  prev_ccline;
+static int		    prev_ccline_used = FALSE;
+
+/*
+ * Save ccline, because obtaining the "=" register may execute "normal :cmd"
+ * and overwrite it.  But get_cmdline_str() may need it, thus make it
+ * available globally in prev_ccline.
+ */
+    static void
+save_cmdline(ccp)
+    struct cmdline_info *ccp;
+{
+    if (!prev_ccline_used)
+    {
+	vim_memset(&prev_ccline, 0, sizeof(struct cmdline_info));
+	prev_ccline_used = TRUE;
+    }
+    *ccp = prev_ccline;
+    prev_ccline = ccline;
+    ccline.cmdbuff = NULL;
+    ccline.cmdprompt = NULL;
+}
+
+/*
+ * Resture ccline after it has been saved with save_cmdline().
+ */
+    static void
+restore_cmdline(ccp)
+    struct cmdline_info *ccp;
+{
+    ccline = prev_ccline;
+    prev_ccline = *ccp;
+}
+
 /*
  * paste a yank register into the command line.
  * used by CTRL-R command in command-line mode
@@ -2572,13 +2612,10 @@
     regname = may_get_selection(regname);
 #endif
 
-    /* Need to save and restore ccline, because obtaining the "=" register may
-     * execute "normal :cmd" and overwrite it. */
-    save_ccline = ccline;
-    ccline.cmdbuff = NULL;
-    ccline.cmdprompt = NULL;
+    /* Need to save and restore ccline. */
+    save_cmdline(&save_ccline);
     i = get_spec_reg(regname, &arg, &allocated, TRUE);
-    ccline = save_ccline;
+    restore_cmdline(&save_ccline);
 
     if (i)
     {
@@ -4534,6 +4571,24 @@
     return history[histype][hisidx[histype]].hisnum;
 }
 
+static struct cmdline_info *get_ccline_ptr __ARGS((void));
+
+/*
+ * Get pointer to the command line info to use. cmdline_paste() may clear
+ * ccline and put the previous value in prev_ccline.
+ */
+    static struct cmdline_info *
+get_ccline_ptr()
+{
+    if ((State & CMDLINE) == 0)
+	return NULL;
+    if (ccline.cmdbuff != NULL)
+	return &ccline;
+    if (prev_ccline_used && prev_ccline.cmdbuff != NULL)
+	return &prev_ccline;
+    return NULL;
+}
+
 /*
  * Get the current command line in allocated memory.
  * Only works when the command line is being edited.
@@ -4542,9 +4597,11 @@
     char_u *
 get_cmdline_str()
 {
-    if (ccline.cmdbuff == NULL || (State & CMDLINE) == 0)
+    struct cmdline_info *p = get_ccline_ptr();
+
+    if (p == NULL)
 	return NULL;
-    return vim_strnsave(ccline.cmdbuff, ccline.cmdlen);
+    return vim_strnsave(p->cmdbuff, p->cmdlen);
 }
 
 /*
@@ -4556,9 +4613,11 @@
     int
 get_cmdline_pos()
 {
-    if (ccline.cmdbuff == NULL || (State & CMDLINE) == 0)
+    struct cmdline_info *p = get_ccline_ptr();
+
+    if (p == NULL)
 	return -1;
-    return ccline.cmdpos;
+    return p->cmdpos;
 }
 
 /*
@@ -4570,7 +4629,9 @@
 set_cmdline_pos(pos)
     int		pos;
 {
-    if (ccline.cmdbuff == NULL || (State & CMDLINE) == 0)
+    struct cmdline_info *p = get_ccline_ptr();
+
+    if (p == NULL)
 	return 1;
 
     /* The position is not set directly but after CTRL-\ e or CTRL-R = has
diff --git a/src/gui_gtk.c b/src/gui_gtk.c
index e9e6d5b..7510308 100644
--- a/src/gui_gtk.c
+++ b/src/gui_gtk.c
@@ -1422,7 +1422,7 @@
 
 #endif	/* FEAT_BROWSE */
 
-#if (defined(FEAT_GUI_DIALOG) && !defined(HAVE_GTK2)) || defined(PROTO)
+#if defined(FEAT_GUI_DIALOG) && !defined(HAVE_GTK2)
 
 static char_u *dialog_textfield = NULL;
 static GtkWidget *dialog_textentry;
@@ -1956,7 +1956,7 @@
 #endif /* FEAT_GUI_DIALOG && !HAVE_GTK2 */
 
 
-#if defined(FEAT_GUI_DIALOG) && defined(HAVE_GTK2)
+#if (defined(FEAT_GUI_DIALOG) && defined(HAVE_GTK2)) || defined(PROTO)
 
     static GtkWidget *
 create_message_dialog(int type, char_u *title, char_u *message)
diff --git a/src/gui_mac.c b/src/gui_mac.c
index b930852..dbdda8a 100644
--- a/src/gui_mac.c
+++ b/src/gui_mac.c
@@ -5674,7 +5674,8 @@
 /*
  * Get current mouse coordinates in text window.
  */
-void gui_mch_getmouse(int *x, int *y)
+    void
+gui_mch_getmouse(int *x, int *y)
 {
     Point where;
 
diff --git a/src/gui_photon.c b/src/gui_photon.c
index fc96cc1..d4360fe 100644
--- a/src/gui_photon.c
+++ b/src/gui_photon.c
@@ -1895,7 +1895,7 @@
     }
 }
 
-    int
+    void
 gui_mch_getmouse(int *x, int *y)
 {
     PhCursorInfo_t info;
diff --git a/src/proto/ex_docmd.pro b/src/proto/ex_docmd.pro
index 9fabda4..0a8b5d3 100644
--- a/src/proto/ex_docmd.pro
+++ b/src/proto/ex_docmd.pro
@@ -4,6 +4,7 @@
 int do_cmdline __ARGS((char_u *cmdline, char_u *(*getline)(int, void *, int), void *cookie, int flags));
 int getline_equal __ARGS((char_u *(*getline)(int, void *, int), void *cookie, char_u *(*func)(int, void *, int)));
 void *getline_cookie __ARGS((char_u *(*getline)(int, void *, int), void *cookie));
+int checkforcmd __ARGS((char_u **pp, char *cmd, int len));
 int cmd_exists __ARGS((char_u *name));
 char_u *set_one_cmd_context __ARGS((expand_T *xp, char_u *buff));
 char_u *skip_range __ARGS((char_u *cmd, int *ctx));
diff --git a/src/quickfix.c b/src/quickfix.c
index fd6eba6..625d19d 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -2295,7 +2295,7 @@
     regmatch.regprog = vim_regcomp(s, RE_MAGIC);
     if (regmatch.regprog == NULL)
 	goto theend;
-    regmatch.rmm_ic = FALSE;
+    regmatch.rmm_ic = p_ic;
 
     p = skipwhite(p);
     if (*p == NUL)
diff --git a/src/testdir/test49.vim b/src/testdir/test49.vim
index e742a96..4c2c001 100644
--- a/src/testdir/test49.vim
+++ b/src/testdir/test49.vim
@@ -1,6 +1,6 @@
 " Vim script language tests
 " Author:	Servatius Brandt <Servatius.Brandt@fujitsu-siemens.com>
-" Last Change:	2004 Apr 03
+" Last Change:	2005 Jan 11
 
 "-------------------------------------------------------------------------------
 " Test environment							    {{{1
@@ -8433,7 +8433,7 @@
     call T(23, '(1 ? 2) + CONT(23)',	'E109',	"Missing ':' after '?'")
     call T(24, '("abc) + CONT(24)',	'E114',	"Missing quote")
     call T(25, "('abc) + CONT(25)",	'E115',	"Missing quote")
-    call T(26, '& + CONT(26)',		'E112', "Option name missing")
+    call T(26, '& + CONT(26)',		'E712', "Using & outside of map()")
     call T(27, '&asdf + CONT(27)',	'E113', "Unknown option")
 
     Xpath 134217728				" X: 134217728
diff --git a/src/version.h b/src/version.h
index a185231..033ea70 100644
--- a/src/version.h
+++ b/src/version.h
@@ -36,5 +36,5 @@
 #define VIM_VERSION_NODOT	"vim70aa"
 #define VIM_VERSION_SHORT	"7.0aa"
 #define VIM_VERSION_MEDIUM	"7.0aa ALPHA"
-#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2004 Jan 9)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2004 Jan 9, compiled "
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2004 Jan 11)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2004 Jan 11, compiled "