updated for version 7.0049
diff --git a/src/edit.c b/src/edit.c
index 175256e..a889736 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -5151,7 +5151,9 @@
     if (n > 0)
     {
 	lnum = curwin->w_cursor.lnum;
-	if (lnum <= 1)
+	/* This fails if the cursor is already in the first line or the count
+	 * is larger than the line number and '-' is in 'cpoptions' */
+	if (lnum <= 1 || (n >= lnum && vim_strchr(p_cpo, CPO_MINUS) != NULL))
 	    return FAIL;
 	if (n >= lnum)
 	    lnum = 1;
@@ -5212,7 +5214,11 @@
 	/* Move to last line of fold, will fail if it's the end-of-file. */
 	(void)hasFolding(lnum, NULL, &lnum);
 #endif
-	if (lnum >= curbuf->b_ml.ml_line_count)
+	/* This fails if the cursor is already in the last line or would move
+	 * beyound the last line and '-' is in 'cpoptions' */
+	if (lnum >= curbuf->b_ml.ml_line_count
+		|| (lnum + n > curbuf->b_ml.ml_line_count
+		    && vim_strchr(p_cpo, CPO_MINUS) != NULL))
 	    return FAIL;
 	if (lnum + n >= curbuf->b_ml.ml_line_count)
 	    lnum = curbuf->b_ml.ml_line_count;
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 82557fe..6c8ece9 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -2339,11 +2339,12 @@
 	if (SCRIPT_NAME(current_SID) != NULL
 		&& (
 # ifdef UNIX
-		    /* compare dev/ino when possible, it catches symbolic
-		     * links */
-		    (stat_ok && SCRIPT_DEV(current_SID) != -1)
-			? (SCRIPT_DEV(current_SID) == st.st_dev
-			    && SCRIPT_INO(current_SID) == st.st_ino) :
+		    /* Compare dev/ino when possible, it catches symbolic
+		     * links.  Also compare file names, the inode may change
+		     * when the file was edited. */
+		    ((stat_ok && SCRIPT_DEV(current_SID) != -1)
+			&& (SCRIPT_DEV(current_SID) == st.st_dev
+			    && SCRIPT_INO(current_SID) == st.st_ino)) ||
 # endif
 		fnamecmp(SCRIPT_NAME(current_SID), fname_exp) == 0))
 	    break;
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 5cecf30..899e4c8 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -594,6 +594,14 @@
     MSG(_("Entering Ex mode.  Type \"visual\" to go to Normal mode."));
     while (exmode_active)
     {
+#ifdef FEAT_EX_EXTRA
+	/* Check for a ":normal" command and no more characters left. */
+	if (ex_normal_busy > 0 && typebuf.tb_len == 0)
+	{
+	    exmode_active = FALSE;
+	    break;
+	}
+#endif
 	msg_scroll = TRUE;
 	need_wait_return = FALSE;
 	ex_pressedreturn = FALSE;
diff --git a/src/ex_getln.c b/src/ex_getln.c
index e17e671..a7dfd9a 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -996,8 +996,13 @@
 
 	case ESC:	/* get here if p_wc != ESC or when ESC typed twice */
 	case Ctrl_C:
-		/* In exmode it doesn't make sense to return. */
-		if (exmode_active)
+		/* In exmode it doesn't make sense to return. Except when
+		 * ":normal" runs out of characters. */
+		if (exmode_active
+#ifdef FEAT_EX_EXTRA
+			&& (ex_normal_busy == 0 || typebuf.tb_len > 0)
+#endif
+		   )
 		    goto cmdline_not_changed;
 
 		gotesc = TRUE;		/* will free ccline.cmdbuff after
diff --git a/src/fileio.c b/src/fileio.c
index ee1c90b..ea7c924 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2701,6 +2701,7 @@
 	int		buf_fname_s = FALSE;
 	int		did_cmd = FALSE;
 	int		nofile_err = FALSE;
+	int		empty_memline = (buf->b_ml.ml_mfp == NULL);
 
 	/*
 	 * Apply PRE aucocommands.
@@ -2772,7 +2773,7 @@
 	 */
 	if (!buf_valid(buf))
 	    buf = NULL;
-	if (buf == NULL || buf->b_ml.ml_mfp == NULL
+	if (buf == NULL || (buf->b_ml.ml_mfp == NULL && !empty_memline)
 				       || did_cmd || nofile_err || aborting())
 	{
 	    --no_wait_return;
@@ -6650,6 +6651,8 @@
     {"InsertChange",	EVENT_INSERTCHANGE},
     {"InsertEnter",	EVENT_INSERTENTER},
     {"InsertLeave",	EVENT_INSERTLEAVE},
+    {"QuickFixCmdPost",	EVENT_QUICKFIXCMDPOST},
+    {"QuickFixCmdPre",	EVENT_QUICKFIXCMDPRE},
     {"RemoteReply",	EVENT_REMOTEREPLY},
     {"StdinReadPost",	EVENT_STDINREADPOST},
     {"StdinReadPre",	EVENT_STDINREADPRE},
@@ -8042,9 +8045,12 @@
     else
     {
 	sfname = vim_strsave(fname);
-	/* Don't try expanding FileType, Syntax or WindowID. */
-	if (event == EVENT_FILETYPE || event == EVENT_SYNTAX
-						|| event == EVENT_REMOTEREPLY)
+	/* Don't try expanding FileType, Syntax, WindowID or QuickFixCmd* */
+	if (event == EVENT_FILETYPE
+		|| event == EVENT_SYNTAX
+		|| event == EVENT_REMOTEREPLY
+		|| event == EVENT_QUICKFIXCMDPRE
+		|| event == EVENT_QUICKFIXCMDPOST)
 	    fname = vim_strsave(fname);
 	else
 	    fname = FullName_save(fname, FALSE);
diff --git a/src/gui_motif.c b/src/gui_motif.c
index acb9d81..a1da3d0 100644
--- a/src/gui_motif.c
+++ b/src/gui_motif.c
@@ -886,7 +886,8 @@
 #include "gui_x11_pm.h"
 
 static int check_xpm __ARGS((char_u *path));
-static char **get_toolbar_pixmap __ARGS((vimmenu_T *menu));
+static char **get_toolbar_pixmap __ARGS((vimmenu_T *menu, char **fname));
+static int add_pixmap_args __ARGS((vimmenu_T *menu, Arg *args, int n));
 
 /*
  * Read an Xpm file.  Return OK or FAIL.
@@ -916,16 +917,20 @@
 
 /*
  * Allocated a pixmap for toolbar menu "menu".
+ * When it's to be read from a file, "fname" is set to the file name
+ * (in allocated memory).
  * Return a blank pixmap if it fails.
  */
     static char **
-get_toolbar_pixmap(menu)
+get_toolbar_pixmap(menu, fname)
     vimmenu_T	*menu;
+    char	**fname;
 {
     char_u	buf[MAXPATHL];		/* buffer storing expanded pathname */
     char	**xpm = NULL;		/* xpm array */
     int		res;
 
+    *fname = NULL;
     buf[0] = NUL;			/* start with NULL path */
 
     if (menu->iconfile != NULL)
@@ -938,7 +943,10 @@
 	if (res == FAIL && gui_find_bitmap(menu->name, buf, "xpm") == OK)
 	    res = check_xpm(buf);
 	if (res == OK)
+	{
+	    *fname = (char *)vim_strsave(buf);
 	    return tb_blank_xpm;
+	}
     }
 
     if (menu->icon_builtin || gui_find_bitmap(menu->name, buf, "xpm") == FAIL)
@@ -952,6 +960,33 @@
 
     return xpm;
 }
+
+/*
+ * Add arguments for the toolbar pixmap to a menu item.
+ */
+    static int
+add_pixmap_args(menu, args, n)
+    vimmenu_T	*menu;
+    Arg		*args;
+    int		n;
+{
+    vim_free(menu->xpm_fname);
+    menu->xpm = get_toolbar_pixmap(menu, &menu->xpm_fname);
+    if (menu->xpm == NULL)
+    {
+	XtSetArg(args[n], XmNlabelType, XmSTRING); n++;
+    }
+    else
+    {
+	if (menu->xpm_fname != NULL)
+	{
+	    XtSetArg(args[n], XmNpixmapFile, menu->xpm_fname); n++;
+	}
+	XtSetArg(args[n], XmNpixmapData, menu->xpm); n++;
+	XtSetArg(args[n], XmNlabelLocation, XmBOTTOM); n++;
+    }
+    return n;
+}
 #endif /* FEAT_TOOLBAR */
 
     void
@@ -1025,16 +1060,8 @@
 	    xms = XmStringCreate((char *)menu->dname, STRING_TAG);
 	    XtSetArg(args[n], XmNlabelString, xms); n++;
 
-	    menu->xpm = get_toolbar_pixmap(menu);
-	    if (menu->xpm == NULL)
-	    {
-		XtSetArg(args[n], XmNlabelType, XmSTRING); n++;
-	    }
-	    else
-	    {
-		XtSetArg(args[n], XmNpixmapData, menu->xpm); n++;
-		XtSetArg(args[n], XmNlabelLocation, XmBOTTOM); n++;
-	    }
+	    n = add_pixmap_args(menu, args, n);
+
 	    type = xmEnhancedButtonWidgetClass;
 	}
 
@@ -1264,16 +1291,7 @@
 		    int		n = 0;
 		    Arg		args[18];
 
-		    mp->xpm = get_toolbar_pixmap(mp);
-		    if (menu->xpm == NULL)
-		    {
-			XtSetArg(args[n], XmNlabelType, XmSTRING); n++;
-		    }
-		    else
-		    {
-			XtSetArg(args[n], XmNpixmapData, menu->xpm); n++;
-			XtSetArg(args[n], XmNlabelLocation, XmBOTTOM); n++;
-		    }
+		    n = add_pixmap_args(mp, args, n);
 		    XtSetValues(mp->id, args, n);
 		}
 # ifdef FEAT_BEVAL
@@ -2846,6 +2864,23 @@
     return (int)(height + (borders << 1));
 }
 
+    void
+motif_get_toolbar_colors(bgp, fgp, bsp, tsp, hsp)
+    Pixel       *bgp;
+    Pixel       *fgp;
+    Pixel       *bsp;
+    Pixel       *tsp;
+    Pixel       *hsp;
+{
+    XtVaGetValues(toolBar,
+            XmNbackground, bgp,
+            XmNforeground, fgp,
+            XmNbottomShadowColor, bsp,
+            XmNtopShadowColor, tsp,
+            XmNhighlightColor, hsp,
+            NULL);
+}
+
 # ifdef FEAT_FOOTER
 /*
  * The next toolbar enter/leave callbacks should really do balloon help.  But
diff --git a/src/gui_xmebw.c b/src/gui_xmebw.c
index aa22a88..ff7d2e6 100644
--- a/src/gui_xmebw.c
+++ b/src/gui_xmebw.c
@@ -292,13 +292,14 @@
     int		    x;
     int		    y;
     unsigned int    height, width, border, depth;
-    int		    status;
+    int		    status = 0;
     Pixmap	    mask;
     Pixmap	    pix = None;
     Pixmap	    arm_pix = None;
     Pixmap	    ins_pix = None;
     Pixmap	    high_pix = None;
     char	    **data = (char **) eb->enhancedbutton.pixmap_data;
+    char	    *fname = (char *) eb->enhancedbutton.pixmap_file;
     int		    shift;
     GC		    gc;
 
@@ -313,6 +314,7 @@
     root = RootWindow(dpy, scr);
 
     eb->label.pixmap = None;
+
     eb->enhancedbutton.pixmap_depth = 0;
     eb->enhancedbutton.pixmap_width = 0;
     eb->enhancedbutton.pixmap_height = 0;
@@ -321,6 +323,14 @@
     eb->enhancedbutton.highlight_pixmap = None;
     eb->enhancedbutton.insensitive_pixmap = None;
 
+    /* We use dynamic colors, get them now. */
+    motif_get_toolbar_colors(
+	    &eb->core.background_pixel,
+	    &eb->primitive.foreground,
+	    &eb->primitive.bottom_shadow_color,
+	    &eb->primitive.top_shadow_color,
+	    &eb->primitive.highlight_color);
+
     /* Setup color subsititution table. */
     color[0].pixel = eb->core.background_pixel;
     color[1].pixel = eb->core.background_pixel;
@@ -337,9 +347,12 @@
     attr.colorsymbols = color;
     attr.numsymbols = XtNumber(color);
 
-    status = XpmCreatePixmapFromData(dpy, root, data, &pix, &mask, &attr);
+    if (fname)
+	status = XpmReadFileToPixmap(dpy, root, fname, &pix, &mask, &attr);
+    if (!fname || status != XpmSuccess)
+	status = XpmCreatePixmapFromData(dpy, root, data, &pix, &mask, &attr);
 
-    /* If somethin failed, we will fill in the default pixmap. */
+    /* If something failed, we will fill in the default pixmap. */
     if (status != XpmSuccess)
 	status = XpmCreatePixmapFromData(dpy, root, blank_xpm, &pix,
 								&mask, &attr);
diff --git a/src/move.c b/src/move.c
index 2fc2260..f3d7825 100644
--- a/src/move.c
+++ b/src/move.c
@@ -2471,7 +2471,8 @@
     foldAdjustCursor();
 #endif
     cursor_correct();
-    beginline(BL_SOL | BL_FIX);
+    if (retval == OK)
+	beginline(BL_SOL | BL_FIX);
     curwin->w_valid &= ~(VALID_WCOL|VALID_WROW|VALID_VIRTCOL);
 
     /*
diff --git a/src/ops.c b/src/ops.c
index 4a05292..8541c31 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -5829,16 +5829,16 @@
     vim_memset(oap, 0, sizeof(oparg_T));
 }
 
-static long	line_count_info __ARGS((char_u *line, long *wc, long limit, int eol_size));
+static long	line_count_info __ARGS((char_u *line, long *wc, long *cc, long limit, int eol_size));
 
 /*
- *  Count the number of characters and "words" in a line.
+ *  Count the number of bytes, characters and "words" in a line.
  *
  *  "Words" are counted by looking for boundaries between non-space and
  *  space characters.  (it seems to produce results that match 'wc'.)
  *
- *  Return value is character count; word count for the line is ADDED
- *  to "*wc".
+ *  Return value is byte count; word count for the line is added to "*wc".
+ *  Char count is added to "*cc".
  *
  *  The function will only examine the first "limit" characters in the
  *  line, stopping if it encounters an end-of-line (NUL byte).  In that
@@ -5846,16 +5846,19 @@
  *  the size of the EOL character.
  */
     static long
-line_count_info(line, wc, limit, eol_size)
+line_count_info(line, wc, cc, limit, eol_size)
     char_u	*line;
     long	*wc;
+    long	*cc;
     long	limit;
     int		eol_size;
 {
-    long	i, words = 0;
+    long	i;
+    long	words = 0;
+    long	chars = 0;
     int		is_word = 0;
 
-    for (i = 0; line[i] && i < limit; i++)
+    for (i = 0; line[i] && i < limit; )
     {
 	if (is_word)
 	{
@@ -5867,6 +5870,12 @@
 	}
 	else if (!vim_isspace(line[i]))
 	    is_word = 1;
+	++chars;
+#ifdef FEAT_MBYTE
+	i += mb_ptr2len_check(line + i);
+#else
+	++i;
+#endif
     }
 
     if (is_word)
@@ -5874,8 +5883,12 @@
     *wc += words;
 
     /* Add eol_size if the end of line was reached before hitting limit. */
-    if (!line[i] && i < limit)
+    if (line[i] == NUL && i < limit)
+    {
 	i += eol_size;
+	chars += eol_size;
+    }
+    *cc += chars;
     return i;
 }
 
@@ -5891,12 +5904,14 @@
     char_u	buf1[20];
     char_u	buf2[20];
     linenr_T	lnum;
+    long	byte_count = 0;
+    long	byte_count_cursor = 0;
     long	char_count = 0;
     long	char_count_cursor = 0;
-    int		eol_size;
-    long	last_check = 100000L;
     long	word_count = 0;
     long	word_count_cursor = 0;
+    int		eol_size;
+    long	last_check = 100000L;
 #ifdef FEAT_VISUAL
     long	line_count_selected = 0;
     pos_T	min_pos, max_pos;
@@ -5956,12 +5971,12 @@
 	for (lnum = 1; lnum <= curbuf->b_ml.ml_line_count; ++lnum)
 	{
 	    /* Check for a CTRL-C every 100000 characters. */
-	    if (char_count > last_check)
+	    if (byte_count > last_check)
 	    {
 		ui_breakcheck();
 		if (got_int)
 		    return;
-		last_check = char_count + 100000L;
+		last_check = byte_count + 100000L;
 	    }
 
 #ifdef FEAT_VISUAL
@@ -6003,13 +6018,13 @@
 		}
 		if (s != NULL)
 		{
-		    char_count_cursor += line_count_info(s,
-					   &word_count_cursor, len, eol_size);
+		    byte_count_cursor += line_count_info(s, &word_count_cursor,
+					   &char_count_cursor, len, eol_size);
 		    if (lnum == curbuf->b_ml.ml_line_count
 			    && !curbuf->b_p_eol
 			    && curbuf->b_p_bin
 			    && (long)STRLEN(s) < len)
-			char_count_cursor -= eol_size;
+			byte_count_cursor -= eol_size;
 		}
 	    }
 	    else
@@ -6019,19 +6034,21 @@
 		if (lnum == curwin->w_cursor.lnum)
 		{
 		    word_count_cursor += word_count;
-		    char_count_cursor = char_count +
-			line_count_info(ml_get(lnum), &word_count_cursor,
+		    char_count_cursor += char_count;
+		    byte_count_cursor = byte_count +
+			line_count_info(ml_get(lnum),
+				&word_count_cursor, &char_count_cursor,
 				  (long)(curwin->w_cursor.col + 1), eol_size);
 		}
 	    }
 	    /* Add to the running totals */
-	    char_count += line_count_info(ml_get(lnum), &word_count,
-						      (long)MAXCOL, eol_size);
+	    byte_count += line_count_info(ml_get(lnum), &word_count,
+					 &char_count, (long)MAXCOL, eol_size);
 	}
 
 	/* Correction for when last line doesn't have an EOL. */
 	if (!curbuf->b_p_eol && curbuf->b_p_bin)
-	    char_count -= eol_size;
+	    byte_count -= eol_size;
 
 #ifdef FEAT_VISUAL
 	if (VIsual_active)
@@ -6046,12 +6063,20 @@
 	    else
 		buf1[0] = NUL;
 
-	    sprintf((char *)IObuff,
-	    _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Bytes"),
+	    if (char_count_cursor == byte_count_cursor
+		    && char_count == byte_count)
+		sprintf((char *)IObuff, _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Bytes"),
 			buf1, line_count_selected,
 			(long)curbuf->b_ml.ml_line_count,
 			word_count_cursor, word_count,
-			char_count_cursor, char_count);
+			byte_count_cursor, byte_count);
+	    else
+		sprintf((char *)IObuff, _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Chars; %ld of %ld Bytes"),
+			buf1, line_count_selected,
+			(long)curbuf->b_ml.ml_line_count,
+			word_count_cursor, word_count,
+			char_count_cursor, char_count,
+			byte_count_cursor, byte_count);
 	}
 	else
 #endif
@@ -6062,20 +6087,29 @@
 		    (int)curwin->w_virtcol + 1);
 	    col_print(buf2, (int)STRLEN(p), linetabsize(p));
 
-	    sprintf((char *)IObuff,
-		_("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Byte %ld of %ld"),
+	    if (char_count_cursor == byte_count_cursor
+		    && char_count == byte_count)
+		sprintf((char *)IObuff, _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Byte %ld of %ld"),
 		    (char *)buf1, (char *)buf2,
 		    (long)curwin->w_cursor.lnum,
 		    (long)curbuf->b_ml.ml_line_count,
 		    word_count_cursor, word_count,
-		    char_count_cursor, char_count);
+		    byte_count_cursor, byte_count);
+	    else
+		sprintf((char *)IObuff, _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Char %ld of %ld; Byte %ld of %ld"),
+		    (char *)buf1, (char *)buf2,
+		    (long)curwin->w_cursor.lnum,
+		    (long)curbuf->b_ml.ml_line_count,
+		    word_count_cursor, word_count,
+		    char_count_cursor, char_count,
+		    byte_count_cursor, byte_count);
 	}
 
 #ifdef FEAT_MBYTE
-	char_count = bomb_size();
-	if (char_count > 0)
+	byte_count = bomb_size();
+	if (byte_count > 0)
 	    sprintf((char *)IObuff + STRLEN(IObuff), _("(+%ld for BOM)"),
-								  char_count);
+								  byte_count);
 #endif
 	/* Don't shorten this message, the user asked for it. */
 	p = p_shm;
diff --git a/src/option.c b/src/option.c
index 0c6178d..ffeaf86 100644
--- a/src/option.c
+++ b/src/option.c
@@ -2593,18 +2593,19 @@
 
     /*
      * Find default value for 'shell' option.
+     * Don't use it if it is empty.
      */
-    if ((p = mch_getenv((char_u *)"SHELL")) != NULL
+    if (((p = mch_getenv((char_u *)"SHELL")) != NULL && *p != NUL)
 #if defined(MSDOS) || defined(MSWIN) || defined(OS2)
 # ifdef __EMX__
-	    || (p = mch_getenv((char_u *)"EMXSHELL")) != NULL
+	    || ((p = mch_getenv((char_u *)"EMXSHELL")) != NULL && *p != NUL)
 # endif
-	    || (p = mch_getenv((char_u *)"COMSPEC")) != NULL
+	    || ((p = mch_getenv((char_u *)"COMSPEC")) != NULL && *p != NUL)
 # ifdef WIN3264
-	    || (p = default_shell()) != NULL
+	    || ((p = default_shell()) != NULL && *p != NUL)
 # endif
 #endif
-       )
+	    )
 	set_string_default("sh", p);
 
 #ifdef FEAT_WILDIGN
diff --git a/src/option.h b/src/option.h
index 1fb5488..9be2c49 100644
--- a/src/option.h
+++ b/src/option.h
@@ -162,9 +162,10 @@
 #define CPO_MATCH	'%'
 #define CPO_STAR	'*'	/* ":*" means ":@" */
 #define CPO_PLUS	'+'	/* ":write file" resets 'modified' */
+#define CPO_MINUS	'-'	/* "9-" fails at and before line 9 */
 #define CPO_SPECI	'<'	/* don't recognize <> in mappings */
 #define CPO_DEFAULT	"aABceFs"
-#define CPO_ALL		"aAbBcCdDeEfFgiIjJkKlLmMnoOprRsStuvwWxy$!%*+<"
+#define CPO_ALL		"aAbBcCdDeEfFgiIjJkKlLmMnoOprRsStuvwWxy$!%*-+<"
 
 /* characters for p_ww option: */
 #define WW_ALL		"bshl<>[],~"
diff --git a/src/os_unix.c b/src/os_unix.c
index 4dd38ce..c09638f 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -3222,8 +3222,9 @@
 
     /*
      * 2. get size from environment
+     *    When being POSIX compliant this overrules the ioctl() values!
      */
-    if (columns == 0 || rows == 0)
+    if (columns == 0 || rows == 0 || getenv("VIM_POSIX") != NULL)
     {
 	if ((p = (char_u *)getenv("LINES")))
 	    rows = atoi((char *)p);
diff --git a/src/proto/gui_motif.pro b/src/proto/gui_motif.pro
index 94a7c45..8c49d2f 100644
--- a/src/proto/gui_motif.pro
+++ b/src/proto/gui_motif.pro
@@ -34,6 +34,7 @@
 void gui_mch_set_footer __ARGS((char_u *s));
 void gui_mch_show_toolbar __ARGS((int showit));
 int gui_mch_compute_toolbar_height __ARGS((void));
+void motif_get_toolbar_colors __ARGS((Pixel *bgp, Pixel *fgp, Pixel *bsp, Pixel *tsp, Pixel *hsp));
 void gui_motif_menu_fontlist __ARGS((Widget id));
 void gui_mch_find_dialog __ARGS((exarg_T *eap));
 void gui_mch_replace_dialog __ARGS((exarg_T *eap));
diff --git a/src/quickfix.c b/src/quickfix.c
index a411003..a8544b3 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -2083,9 +2083,27 @@
 ex_make(eap)
     exarg_T	*eap;
 {
-    char_u	*name;
+    char_u	*fname;
     char_u	*cmd;
     unsigned	len;
+#ifdef FEAT_AUTOCMD
+    char_u	*au_name = NULL;
+
+    switch (eap->cmdidx)
+    {
+	case CMD_make: au_name = (char_u *)"make"; break;
+	case CMD_grep: au_name = (char_u *)"grep"; break;
+	case CMD_grepadd: au_name = (char_u *)"grepadd"; break;
+	default: break;
+    }
+    if (au_name != NULL)
+    {
+	apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name,
+					       curbuf->b_fname, TRUE, curbuf);
+	if (did_throw || force_abort)
+	    return;
+    }
+#endif
 
     /* Redirect ":grep" to ":vimgrep" if 'grepprg' is "internal". */
     if (grep_internal(eap->cmdidx))
@@ -2095,24 +2113,24 @@
     }
 
     autowrite_all();
-    name = get_mef_name();
-    if (name == NULL)
+    fname = get_mef_name();
+    if (fname == NULL)
 	return;
-    mch_remove(name);	    /* in case it's not unique */
+    mch_remove(fname);	    /* in case it's not unique */
 
     /*
      * If 'shellpipe' empty: don't redirect to 'errorfile'.
      */
     len = (unsigned)STRLEN(p_shq) * 2 + (unsigned)STRLEN(eap->arg) + 1;
     if (*p_sp != NUL)
-	len += (unsigned)STRLEN(p_sp) + (unsigned)STRLEN(name) + 3;
+	len += (unsigned)STRLEN(p_sp) + (unsigned)STRLEN(fname) + 3;
     cmd = alloc(len);
     if (cmd == NULL)
 	return;
     sprintf((char *)cmd, "%s%s%s", (char *)p_shq, (char *)eap->arg,
 							       (char *)p_shq);
     if (*p_sp != NUL)
-	append_redir(cmd, p_sp, name);
+	append_redir(cmd, p_sp, fname);
     /*
      * Output a newline if there's something else than the :make command that
      * was typed (in which case the cursor is in column 0).
@@ -2132,14 +2150,20 @@
     (void)char_avail();
 #endif
 
-    if (qf_init(name, eap->cmdidx != CMD_make ? p_gefm : p_efm,
+    if (qf_init(fname, eap->cmdidx != CMD_make ? p_gefm : p_efm,
 					       eap->cmdidx != CMD_grepadd) > 0
 	    && !eap->forceit)
 	qf_jump(0, 0, FALSE);		/* display first error */
 
-    mch_remove(name);
-    vim_free(name);
+    mch_remove(fname);
+    vim_free(fname);
     vim_free(cmd);
+
+#ifdef FEAT_AUTOCMD
+    if (au_name != NULL)
+	apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+					       curbuf->b_fname, TRUE, curbuf);
+#endif
 }
 
 /*
@@ -2275,6 +2299,23 @@
     char_u	*save_ei = NULL;
     aco_save_T	aco;
 #endif
+#ifdef FEAT_AUTOCMD
+    char_u	*au_name =  NULL;
+
+    switch (eap->cmdidx)
+    {
+	case CMD_vimgrep: au_name = (char_u *)"vimgrep"; break;
+	case CMD_vimgrepadd: au_name = (char_u *)"vimgrepadd"; break;
+	default: break;
+    }
+    if (au_name != NULL)
+    {
+	apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name,
+					       curbuf->b_fname, TRUE, curbuf);
+	if (did_throw || force_abort)
+	    return;
+    }
+#endif
 
     /* Make 'cpoptions' empty, the 'l' flag should not be used here. */
     save_cpo = p_cpo;
@@ -2496,6 +2537,12 @@
     else
 	EMSG2(_(e_nomatch2), s);
 
+#ifdef FEAT_AUTOCMD
+    if (au_name != NULL)
+	apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+					       curbuf->b_fname, TRUE, curbuf);
+#endif
+
 theend:
     vim_free(regmatch.regprog);
 
diff --git a/src/structs.h b/src/structs.h
index ff4d2d6..8a81611 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1967,6 +1967,7 @@
 #ifdef FEAT_GUI_MOTIF
     int		sensitive;	    /* turn button on/off */
     char	**xpm;		    /* pixmap data */
+    char	*xpm_fname;	    /* file with pixmap data */
 #endif
 #ifdef FEAT_GUI_ATHENA
     Pixmap	image;		    /* Toolbar image */
diff --git a/src/version.h b/src/version.h
index 187babb..6dfc7d5 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 (2005 Feb 5)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2005 Feb 5, compiled "
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2005 Feb 7)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2005 Feb 7, compiled "
diff --git a/src/vim.h b/src/vim.h
index 98d3331..9ffaf9f 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1074,6 +1074,8 @@
     EVENT_INSERTCHANGE,		/* when changing Insert/Replace mode */
     EVENT_INSERTENTER,		/* when entering Insert mode */
     EVENT_INSERTLEAVE,		/* when leaving Insert mode */
+    EVENT_QUICKFIXCMDPOST,	/* after :make, :grep etc */
+    EVENT_QUICKFIXCMDPRE,	/* before :make, :grep etc */
     EVENT_STDINREADPOST,	/* after reading from stdin */
     EVENT_STDINREADPRE,		/* before reading from stdin */
     EVENT_SYNTAX,		/* syntax selected */