Add the 'undoreload' option to be able to undo a file reload.
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 09e9ab3..13932e0 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -7361,6 +7361,8 @@
 	file on buffer read.
 	The directory where the undo file is stored is specified by 'undodir'.
 	For more information about this feature see |undo-persistence|.
+	The undo file is not read when 'undoreload' causes the buffer from
+	before a reload to be saved for undo.
 	WARNING: this is a very new feature.  Use at your own risk!
 
 						*'undolevels'* *'ul'*
@@ -7382,6 +7384,22 @@
 <	This helps when you run out of memory for a single change.
 	Also see |clear-undo|.
 
+						*'undoreload'* *'ur'*
+'undoreload' 'ur'	number	(default 10000)
+			global
+			{not in Vi}
+	Save the whole buffer for undo when reloading it.  This applies to the
+	":e!" command and reloading for when the buffer changed outside of
+	Vim. |FileChangedShell|
+	The save only happens when this options is negative or when the number
+	of lines is smaller than the value of this option.
+	Set this option to zero to disable undo for a reload.
+
+	When saving undo for a reload, any undo file is not read.
+
+	Note that this causes the whole buffer to be stored in memory.  Set
+	this option to a lower value if you run out of memory.
+
 						*'updatecount'* *'uc'*
 'updatecount' 'uc'	number	(default: 200)
 			global
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 45ee674..78edec1 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -1029,8 +1029,10 @@
 'undodir'	options.txt	/*'undodir'*
 'undofile'	options.txt	/*'undofile'*
 'undolevels'	options.txt	/*'undolevels'*
+'undoreload'	options.txt	/*'undoreload'*
 'updatecount'	options.txt	/*'updatecount'*
 'updatetime'	options.txt	/*'updatetime'*
+'ur'	options.txt	/*'ur'*
 'ut'	options.txt	/*'ut'*
 'vb'	options.txt	/*'vb'*
 'vbs'	options.txt	/*'vbs'*
@@ -6081,6 +6083,7 @@
 hl-ErrorMsg	syntax.txt	/*hl-ErrorMsg*
 hl-FoldColumn	syntax.txt	/*hl-FoldColumn*
 hl-Folded	syntax.txt	/*hl-Folded*
+hl-Ignore	syntax.txt	/*hl-Ignore*
 hl-IncSearch	syntax.txt	/*hl-IncSearch*
 hl-LineNr	syntax.txt	/*hl-LineNr*
 hl-MatchParen	syntax.txt	/*hl-MatchParen*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index acbacb5..8327884 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -40,9 +40,6 @@
     New patch 2010 Jul 24
     Docs patch by Dominique Pelle, Mar 25 included?
 
-'undoreload' option: when fewer lines than these consider a reload as a change
-action and save the text before the reload, don't clear undo info.
-
 Patch for :find completion. (Nazri Ramliy)
 But I prefer to keep term.h and include/term.h  He will work on it.
 
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index 9fa0dab..de2a7de 100644
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt*  For Vim version 7.3b.  Last change: 2010 Jul 20
+*version7.txt*  For Vim version 7.3b.  Last change: 2010 Jul 24
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -7171,6 +7171,9 @@
 Add file save counter to undo information.
 Added the |undotree()| and |undofile()| functions.
 
+Also added the 'undoreload' option.  This makes it possible to save the
+current text when reloading the buffer, so that it can be undone.
+
 
 More encryption					*new-more-encryption*
 ---------------
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index c27fbd5..404cf89 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -722,6 +722,8 @@
 call <SID>Header("editing text")
 call append("$", "undolevels\tmaximum number of changes that can be undone")
 call append("$", " \tset ul=" . &ul)
+call append("$", "undoreload\tmaximum number lines to save for undo on a buffer reload")
+call append("$", " \tset ur=" . &ur)
 call append("$", "modified\tchanges have been made and not written to a file")
 call append("$", "\t(local to buffer)")
 call <SID>BinOptionL("mod")