From: Vinicius Jose Latorre Date: Wed, 12 Dec 2007 01:18:26 +0000 (+0000) Subject: return back entry: revert-buffer should eliminate overlays and the mark X-Git-Tag: emacs-pretest-23.0.90~8939 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2a29c40930f8585f3bf6b19e85eb6703dcc38ae5;p=emacs.git return back entry: revert-buffer should eliminate overlays and the mark --- diff --git a/etc/TODO b/etc/TODO index cfd8dba2ec2..7d4c5d34980 100644 --- a/etc/TODO +++ b/etc/TODO @@ -37,6 +37,8 @@ a window doesn't select it. ** buffer-offer-save should be a permanent local. +** revert-buffer should eliminate overlays and the mark. + ** erase-buffer should perhaps disregard read-only properties of text. ** Make occur correctly handle matches that span more than one line, diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 260a6a802a0..12cbb15eacc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 (tiny change) - - * file.el (revert-buffer): Eliminate overlays and the mark. - 2007-12-10 Stefan Monnier * server.el (server-select-display): Fix important typo. diff --git a/lisp/files.el b/lisp/files.el index e6f957f480f..8d5fcfda8c2 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4204,12 +4204,10 @@ This undoes all changes since the file was visited or saved. 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 @@ non-nil, it is called instead of rereading visited file contents." (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