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 | |
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.
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/view.el | 12 |
2 files changed, 12 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c250b2ddef4..feab754d2a2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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): 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. |