Mercurial > emacs
changeset 105822:59656f4a5cda
(view-mode-exit): If OLD-BUF is dead bury the buffer
instead of deleting the window or frame.
author | Andreas Schwab <schwab@linux-m68k.org> |
---|---|
date | Sun, 01 Nov 2009 09:47:58 +0000 |
parents | 18698b6aca31 |
children | dd97d1526b9f |
files | lisp/ChangeLog lisp/view.el |
diffstat | 2 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sat Oct 31 21:52:53 2009 +0000 +++ b/lisp/ChangeLog Sun Nov 01 09:47:58 2009 +0000 @@ -1,3 +1,8 @@ +2009-11-01 Andreas Schwab <schwab@linux-m68k.org> + + * view.el (view-mode-exit): If OLD-BUF is dead bury the buffer + instead of deleting the window or frame. + 2009-10-31 Chong Yidong <cyd@stupidchicken.com> * textmodes/sgml-mode.el (sgml-mode-facemenu-add-face-function):
--- a/lisp/view.el Sat Oct 31 21:52:53 2009 +0000 +++ b/lisp/view.el Sun Nov 01 09:47:58 2009 +0000 @@ -660,11 +660,13 @@ (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.