Added the undofile() function.  Updated runtime files.
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 08b79bb..4d983bf 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1943,6 +1943,7 @@
 					to chars in {tostr}
 trunc( {expr}			Float	truncate Float {expr}
 type( {name})			Number	type of variable {name}
+undofile( {name})		String	undo file name for {name}
 values( {dict})			List	values in {dict}
 virtcol( {expr})		Number	screen column of cursor or mark
 visualmode( [expr])		String	last visual mode used
@@ -5767,6 +5768,15 @@
 			:if type(myvar) == type({})
 			:if type(myvar) == type(0.0)
 
+undofile({name})					*undofile()*
+		Return the name of the undo file that would be used for a file
+		with name {name} when writing.  This uses the 'undodir'
+		option, finding directories that exist.  It does not check if
+		the undo file exist.
+		Useful in combination with |:wundo| and |:rundo|.
+		When compiled without the +persistent_undo option this always
+		returns an empty string.
+
 values({dict})						*values()*
 		Return a |List| with all the values of {dict}.	The |List| is
 		in arbitrary order.