diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-10-21 20:01:17 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-10-21 20:01:17 +0000 |
commit | 872c2845417bdf7dc43e03e10104137a6d61a930 (patch) | |
tree | 73c488279a3bd26893929e3d2fed24d80f1f00c1 /lisp/view.el | |
parent | ca5ed1961697da6142c2e015b568f82499a176f0 (diff) | |
download | emacs-872c2845417bdf7dc43e03e10104137a6d61a930.tar.gz |
(view-file): Do record the buffer switch.
Diffstat (limited to 'lisp/view.el')
-rw-r--r-- | lisp/view.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/view.el b/lisp/view.el index d7a1c29cf3a..5eaff500172 100644 --- a/lisp/view.el +++ b/lisp/view.el @@ -110,7 +110,7 @@ This command runs the normal hook `view-mode-hook'." (let ((old-buf (current-buffer)) (had-a-buf (get-file-buffer file-name)) (buf-to-view (find-file-noselect file-name))) - (switch-to-buffer buf-to-view t) + (switch-to-buffer buf-to-view had-a-buf) (view-mode old-buf (and (not had-a-buf) (not (buffer-modified-p buf-to-view)) 'kill-buffer)))) @@ -130,7 +130,9 @@ This command runs the normal hook `view-mode-hook'." (let ((old-arrangement (current-window-configuration)) (had-a-buf (get-file-buffer file-name)) (buf-to-view (find-file-noselect file-name))) - (switch-to-buffer-other-window buf-to-view) + ;; This used to pass t as second argument, + ;; but then the buffer did not show up in the Buffers menu. + (switch-to-buffer-other-window) (view-mode old-arrangement (and (not had-a-buf) (not (buffer-modified-p buf-to-view)) 'kill-buffer)))) |