diff lisp/window.el @ 55015:10dc0a48bc2c

(split-window-save-restore-data): Don't update the data if OLD-INFO is nil.
author Richard M. Stallman <rms@gnu.org>
date Tue, 20 Apr 2004 20:58:04 +0000
parents 0a356c1b7057
children 1709fc8089c9
line wrap: on
line diff
--- a/lisp/window.el	Tue Apr 20 20:57:10 2004 +0000
+++ b/lisp/window.el	Tue Apr 20 20:58:04 2004 +0000
@@ -327,8 +327,9 @@
   (with-current-buffer (window-buffer)
     (if view-mode
 	(let ((old-info (assq old-w view-return-to-alist)))
-	  (push (cons new-w (cons (and old-info (car (cdr old-info))) t))
-		view-return-to-alist)))
+	  (if old-info
+	      (push (cons new-w (cons (car (cdr old-info)) t))
+		    view-return-to-alist))))
     new-w))
 
 (defun split-window-horizontally (&optional arg)