Source

vm / vm-window.el

Diff from to

File vm-window.el

 					  (lambda (x)
 					    (if (symbolp x)
 						(symbol-value x)
-					      x ))))
+					      (if (and (stringp x)
+						       (get-buffer x)
+						       (zerop
+							(save-excursion
+							  (set-buffer x)
+							  (buffer-size))))
+						  nonexistent
+						x )))))
       (set-tapestry (nth 1 config) 1)
       (and (get-buffer nonexistent)
 	   (vm-maybe-delete-windows-or-frames-on nonexistent))
 (defun vm-unbury-buffer (buffer)
   (save-excursion
     (save-window-excursion
-      (switch-to-buffer buffer))))
+      ;; catch errors--- the selected window might be a dedicated
+      ;; window or a minibuffer window.  We don't care and we
+      ;; don't want to crash because of it.
+      (condition-case data
+	  (switch-to-buffer buffer)
+	(error nil)))))
 
 (defun vm-get-buffer-window (buffer)
   (condition-case nil