changeset 87268:176116c3fd05

return back entry: revert-buffer should eliminate overlays and the mark
author Vinicius Jose Latorre <viniciusjl@ig.com.br>
date Wed, 12 Dec 2007 01:18:26 +0000
parents 7561d0f34da7
children 59fee65281f5
files lisp/ChangeLog lisp/files.el
diffstat 2 files changed, 5 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Dec 12 01:14:27 2007 +0000
+++ b/lisp/ChangeLog	Wed Dec 12 01:18:26 2007 +0000
@@ -9,10 +9,6 @@
 	* calc/calc.el (calc-set-mode-line): Use `math-lang-name'
 	to set language name.
 
-2007-12-10  Yoni Rabkin Katzenell  <yoni-r@actcom.com>  (tiny change)
-
-	* file.el (revert-buffer): Eliminate overlays and the mark.
-
 2007-12-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* server.el (server-select-display): Fix important typo.
--- a/lisp/files.el	Wed Dec 12 01:14:27 2007 +0000
+++ b/lisp/files.el	Wed Dec 12 01:18:26 2007 +0000
@@ -4204,12 +4204,10 @@
 With a prefix argument, offer to revert from latest auto-save file, if
 that is more recent than the visited file.
 
-This command also implements an interface for special buffers
-that contain text which doesn't come from a file, but reflects
-some other data instead (e.g. Dired buffers, `buffer-list'
-buffers).  This is done via the variable
-`revert-buffer-function'.  In these cases, it should reconstruct
-the buffer contents from the appropriate data.
+This command also works for special buffers that contain text which
+doesn't come from a file, but reflects some other data base instead:
+for example, Dired buffers and `buffer-list' buffers.  In these cases,
+it reconstructs the buffer contents from the appropriate data base.
 
 When called from Lisp, the first argument is IGNORE-AUTO; only offer
 to revert from the auto-save file when this is nil.  Note that the
@@ -4325,11 +4323,7 @@
 			   (insert-file-contents file-name (not auto-save-p)
 						 nil nil t))
 		       (insert-file-contents file-name (not auto-save-p)
-					     nil nil t))
-		     ;; Reset the mark and remove all overlays.
-		     (setq mark-active nil
-			   mark-ring nil)
-		     (remove-overlays))))
+					     nil nil t)))))
 		 ;; Recompute the truename in case changes in symlinks
 		 ;; have changed the truename.
 		 (setq buffer-file-truename