updated for version 7.0c12
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index bf03721..790b30e 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -4287,6 +4287,13 @@
     if (eap->skip)	    /* not executing commands, only parsing */
 	return;
 
+    if (!do_count && !curbuf->b_p_ma)
+    {
+	/* Substitusion is not allowed in non-'modifiable' buffer */
+	EMSG(_(e_modifiable));
+	return;
+    }
+
     if (search_regcomp(pat, RE_SUBST, which_pat, SEARCH_HIS, &regmatch) == FAIL)
     {
 	if (do_error)
diff --git a/src/ex_cmds.h b/src/ex_cmds.h
index 32e079d..278a096 100644
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -768,7 +768,7 @@
 EX(CMD_rviminfo,	"rviminfo",	ex_viminfo,
 			BANG|FILE1|TRLBAR|CMDWIN),
 EX(CMD_substitute,	"substitute",	do_sub,
-			RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY),
+			RANGE|WHOLEFOLD|EXTRA|CMDWIN),
 EX(CMD_sNext,		"sNext",	ex_previous,
 			EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR),
 EX(CMD_sargument,	"sargument",	ex_argument,
@@ -828,7 +828,7 @@
 EX(CMD_slast,		"slast",	ex_last,
 			EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR),
 EX(CMD_smagic,		"smagic",	ex_submagic,
-			RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY),
+			RANGE|WHOLEFOLD|EXTRA|CMDWIN),
 EX(CMD_smap,		"smap",		ex_map,
 			EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
 EX(CMD_smapclear,	"smapclear",	ex_mapclear,
@@ -840,7 +840,7 @@
 EX(CMD_sniff,		"sniff",	ex_sniff,
 			EXTRA|TRLBAR),
 EX(CMD_snomagic,	"snomagic",	ex_submagic,
-			RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY),
+			RANGE|WHOLEFOLD|EXTRA|CMDWIN),
 EX(CMD_snoremap,	"snoremap",	ex_map,
 			EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
 EX(CMD_snoremenu,	"snoremenu",	ex_menu,
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index ab616bb..3d6e217 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -1488,7 +1488,7 @@
 	 * may cause a redraw.  But wait_return() is a no-op when vgetc()
 	 * is busy (Quit used from window menu), then make sure we don't
 	 * cause a scroll up. */
-	if (vgetc_busy)
+	if (vgetc_busy > 0)
 	{
 	    msg_row = cmdline_row;
 	    msg_col = 0;
@@ -3696,20 +3696,20 @@
      * redefined and it doesn't use the arguments. */
     loc = setlocale(what, NULL);
 
-# if defined(__BORLANDC__)
+# ifdef WIN32
     if (loc != NULL)
     {
 	char_u	*p;
 
-	/* Borland returns something like "LC_CTYPE=<name>\n"
-	 * Let's try to fix that bug here... */
+	/* setocale() returns something like "LC_COLLATE=<name>;LC_..." when
+	 * one of the values (e.g., LC_CTYPE) differs. */
 	p = vim_strchr(loc, '=');
 	if (p != NULL)
 	{
 	    loc = ++p;
 	    while (*p != NUL)	/* remove trailing newline */
 	    {
-		if (*p < ' ')
+		if (*p < ' ' || *p == ';')
 		{
 		    *p = NUL;
 		    break;
@@ -3778,8 +3778,10 @@
     p = (char_u *)get_locale_val(LC_MESSAGES);
 #  else
     /* This is necessary for Win32, where LC_MESSAGES is not defined and $LANG
-     * may be set to the LCID number. */
-    p = (char_u *)get_locale_val(LC_ALL);
+     * may be set to the LCID number.  LC_COLLATE is the best guess, LC_TIME
+     * and LC_MONETARY may be set differently for a Japanese working in the
+     * US. */
+    p = (char_u *)get_locale_val(LC_COLLATE);
 #  endif
 # else
     p = mch_getenv((char_u *)"LC_ALL");
diff --git a/src/hardcopy.c b/src/hardcopy.c
index e6c89a6..2b5c70e 100644
--- a/src/hardcopy.c
+++ b/src/hardcopy.c
@@ -2474,7 +2474,7 @@
     double      bottom;
 #ifdef FEAT_MBYTE
     int         props;
-    int         cmap;
+    int         cmap = 0;
     char_u	*p_encoding;
     struct prt_ps_encoding_S *p_mbenc;
     struct prt_ps_encoding_S *p_mbenc_first;
diff --git a/src/version.h b/src/version.h
index e3bccb5..993e747 100644
--- a/src/version.h
+++ b/src/version.h
@@ -35,6 +35,6 @@
  */
 #define VIM_VERSION_NODOT	"vim70c"
 #define VIM_VERSION_SHORT	"7.0c"
-#define VIM_VERSION_MEDIUM	"7.0c11 BETA"
-#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0c11 BETA (2006 Apr 6)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0c11 BETA (2006 Apr 6, compiled "
+#define VIM_VERSION_MEDIUM	"7.0c12 BETA"
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0c12 BETA (2006 Apr 7)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0c12 BETA (2006 Apr 7, compiled "