diff -Nur vim73.orig/runtime/doc/change.txt vim73/runtime/doc/change.txt
--- vim73.orig/runtime/doc/change.txt	2010-08-15 21:23:19.000000000 +0900
+++ vim73/runtime/doc/change.txt	2011-03-16 13:30:57.000000000 +0900
@@ -793,10 +793,11 @@
 not apply except for "<CR>", "\<CR>" and "\\".  Thus in the result of the
 expression you need to use two backslashes to get one, put a backslash before a
 <CR> you want to insert, and use a <CR> without a backslash where you want to
-break the line.
+break the line. For convenience a <NL> character is also used as a line break.
 
-For convenience a <NL> character is also used as a line break.  Prepend a
-backslash to get a real <NL> character (which will be a NUL in the file).
+The notation "\=" is valid inside the third argument of substitute() 
+function.  In this case, the special meaning for characters as mentioned 
+at |sub-replace-special| does not apply at all.
 
 When the result is a |List| then the items are joined with separating line
 breaks.  Thus each item becomes a line, except that they can contain line
diff -Nur vim73.orig/runtime/doc/eval.txt vim73/runtime/doc/eval.txt
--- vim73.orig/runtime/doc/eval.txt	2010-08-15 21:23:20.000000000 +0900
+++ vim73/runtime/doc/eval.txt	2011-03-16 14:49:22.000000000 +0900
@@ -5507,9 +5507,10 @@
 		Also see |strlen()|, |strdisplaywidth()| and |strchars()|.
 
 submatch({nr})						*submatch()*
-		Only for an expression in a |:substitute| command.  Returns
-		the {nr}'th submatch of the matched text.  When {nr} is 0
-		the whole matched text is returned.
+		This is used in the expression for |:substitute| command or 
+                |substitute()| function. See also |sub-replace-expression|. 
+                This returns the {nr}'th submatch of the matched text.  When 
+                {nr} is 0 the whole matched text is returned.
 		Example: >
 			:s/\d\+/\=submatch(0) + 1/
 <		This finds the first number in the line and adds one to it.
@@ -5526,7 +5527,9 @@
 		And a "~" in {sub} is not replaced with the previous {sub}.
 		Note that some codes in {sub} have a special meaning
 		|sub-replace-special|.	For example, to replace something with
-		"\n" (two characters), use "\\\\n" or '\\n'.
+		"\n" (two characters), use "\\\\n" or '\\n'. When {sub} starts 
+                with "\=", the remainder is interpreted as an expression. This 
+                does not work recursively. See |sub-replace-expression|.
 		When {pat} does not match in {expr}, {expr} is returned
 		unmodified.
 		When {flags} is "g", all matches of {pat} in {expr} are
diff -Nur vim73.orig/src/regexp.c vim73/src/regexp.c
--- vim73.orig/src/regexp.c	2011-03-06 16:45:15.000000000 +0900
+++ vim73/src/regexp.c	2011-03-16 13:18:11.000000000 +0900
@@ -6872,6 +6872,7 @@
 static regmmatch_T	*submatch_mmatch;
 static linenr_T		submatch_firstlnum;
 static linenr_T		submatch_maxline;
+static int		submatch_line_lbr;
 #endif
 
 #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) || defined(PROTO)
@@ -6998,6 +6999,7 @@
 	    submatch_mmatch = reg_mmatch;
 	    submatch_firstlnum = reg_firstlnum;
 	    submatch_maxline = reg_maxline;
+	    submatch_line_lbr = reg_line_lbr;
 	    save_reg_win = reg_win;
 	    save_ireg_ic = ireg_ic;
 	    can_f_submatch = TRUE;
@@ -7011,7 +7013,7 @@
 		{
 		    /* Change NL to CR, so that it becomes a line break.
 		     * Skip over a backslashed character. */
-		    if (*s == NL)
+		    if (*s == NL && !submatch_line_lbr)
 			*s = CAR;
 		    else if (*s == '\\' && s[1] != NUL)
 		    {
@@ -7021,7 +7023,7 @@
 			 *   abc\
 			 *   def
 			 */
-			if (*s == NL)
+			if (*s == NL && !submatch_line_lbr)
 			    *s = CAR;
 			had_backslash = TRUE;
 		    }
@@ -7044,6 +7046,7 @@
 	    reg_mmatch = submatch_mmatch;
 	    reg_firstlnum = submatch_firstlnum;
 	    reg_maxline = submatch_maxline;
+	    reg_line_lbr = submatch_line_lbr;
 	    reg_win = save_reg_win;
 	    ireg_ic = save_ireg_ic;
 	    can_f_submatch = FALSE;
