diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2009-11-01 09:47:58 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2009-11-01 09:47:58 +0000 |
commit | 97ab3f47a69488b4c31a000b645db0620361dae0 (patch) | |
tree | 5286e575dcdec933e22242f17ba1d4816d4ab5a2 /lisp/view.el | |
parent | 673c1168a07b3c26b0d7e01e049f7226fcc91b00 (diff) | |
download | emacs-97ab3f47a69488b4c31a000b645db0620361dae0.tar.gz |
(view-mode-exit): If OLD-BUF is dead bury the buffer
instead of deleting the window or frame.
Diffstat (limited to 'lisp/view.el')
-rw-r--r-- | lisp/view.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/view.el b/lisp/view.el index 5ec94411ad1..238c9c1bbbe 100644 --- a/lisp/view.el +++ b/lisp/view.el @@ -660,11 +660,13 @@ OLD-WINDOW." (old-buf-info (cdr (cdr (car alist))))) (if all-win (select-window window)) (cond - ((and (consp old-buf-info) ; Case 3. - (buffer-live-p (car old-buf-info))) - (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))))) + ((consp old-buf-info) ; Case 3. + (if (buffer-live-p (car old-buf-info)) + (progn + (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))))) + (bury-buffer))) ((eq old-buf-info 'quit-window) (quit-window)) ; Case 4. (old-buf-info ; Case 2 or 5. |