changeset 21187:f072dd90378d

(view-return-to-alist): Doc fix. (view-mode-enter): Doc fix. (view-mode-exit): Handle new alternative `quit-window' for OLD-BUF-INFO in RETURN-TO-ALIST.
author Richard M. Stallman <rms@gnu.org>
date Mon, 16 Mar 1998 04:09:04 +0000
parents de9c2d924962
children 607ce9d7cf53
files lisp/view.el
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/view.el	Mon Mar 16 01:35:04 1998 +0000
+++ b/lisp/view.el	Mon Mar 16 04:09:04 1998 +0000
@@ -91,7 +91,7 @@
 Commands that restore windows when finished viewing a buffer, apply to all
 windows that display the buffer and have restore information in
 `view-return-to-alist'.
-If view-exits-all-viewing-windows is nil only the selected window is
+If `view-exits-all-viewing-windows' is nil, only the selected window is
 considered for restoring."
   :type 'boolean
   :group 'view)
@@ -131,8 +131,8 @@
 (defvar view-return-to-alist nil
   "What to do with used windows and where to go when finished viewing buffer.
 This is local in each buffer being viewed.
-It is added to by view-mode-enter when starting to view a buffer and
-subtracted from by view-mode-exit when finished viewing the buffer.
+It is added to by `view-mode-enter' when starting to view a buffer and
+subtracted from by `view-mode-exit' when finished viewing the buffer.
 
 See RETURN-TO-ALIST argument of function `view-mode-exit' for the format of
 `view-return-to-alist'.")
@@ -475,6 +475,7 @@
 2) t         Delete WINDOW or, if it is the only window, its frame.
 3) (OLD-BUFF START POINT)  Display buffer OLD-BUFF with displayed text
                            starting at START and point at POINT in WINDOW.
+4) quit-window   Do quit-window in WINDOW.
 
 For list of all View commands, type H or h while viewing.
 
@@ -510,6 +511,7 @@
 2) t         Delete WINDOW or, if it is the only window, its frame.
 3) (OLD-BUF START POINT)  Display buffer OLD-BUF with displayed text
                           starting at START and point at POINT in WINDOW.
+4) quit-window   Do quit-window in WINDOW.
 
 If one of the WINDOW in RETURN-TO-ALIST is the selected window and the
 corresponding OLD-WINDOW is a live window, then select OLD-WINDOW."
@@ -549,6 +551,8 @@
 		  (set-window-buffer window (car old-buf-info)) ; old-buf
 		  (set-window-start window (car (cdr old-buf-info)))
 		  (set-window-point window (car (cdr (cdr old-buf-info)))))
+		 ((eq old-buf-info 'quit-window)
+		  (quit-window)) ; Not case 2, do nothing.
 		 ((not (eq old-buf-info t)) nil) ; Not case 2, do nothing.
 		 ((not (one-window-p t)) (delete-window))
 		 ((not (eq frame (next-frame)))