(old-buffer (window-buffer window))
;; Save this since it's destroyed by `set-window-buffer'.
(next-buffers (window-next-buffers window))
+ (pred (frame-parameter frame 'buffer-predicate))
entry buffer new-buffer killed-buffers visible)
(when (window-dedicated-p window)
(error "Window %s is dedicated to buffer %s" window old-buffer))
(or (buffer-live-p buffer)
(not (setq killed-buffers
(cons buffer killed-buffers))))
+ (or (null pred) (funcall pred buffer))
(not (eq buffer old-buffer))
(or bury-or-kill (not (memq buffer next-buffers))))
(if (and (not switch-to-visible-buffer)
(when (and (buffer-live-p buffer)
(not (eq buffer old-buffer))
(not (eq (aref (buffer-name buffer) 0) ?\s))
+ (or (null pred) (funcall pred buffer))
(or bury-or-kill (not (memq buffer next-buffers))))
(if (get-buffer-window buffer frame)
;; Try to avoid showing a buffer visible in some other window.
(not (setq killed-buffers
(cons buffer killed-buffers))))
(not (eq buffer old-buffer))
+ (or (null pred) (funcall pred buffer))
(setq entry (assq buffer (window-prev-buffers window))))
(setq new-buffer buffer)
(set-window-buffer-start-and-point
(frame (window-frame window))
(old-buffer (window-buffer window))
(next-buffers (window-next-buffers window))
+ (pred (frame-parameter frame 'buffer-predicate))
buffer new-buffer entry killed-buffers visible)
(when (window-dedicated-p window)
(error "Window %s is dedicated to buffer %s" window old-buffer))
(not (setq killed-buffers
(cons buffer killed-buffers))))
(not (eq buffer old-buffer))
+ (or (null pred) (funcall pred buffer))
(setq entry (assq buffer (window-prev-buffers window))))
(setq new-buffer buffer)
(set-window-buffer-start-and-point
(dolist (buffer (buffer-list frame))
(when (and (buffer-live-p buffer) (not (eq buffer old-buffer))
(not (eq (aref (buffer-name buffer) 0) ?\s))
+ (or (null pred) (funcall pred buffer))
(not (assq buffer (window-prev-buffers window))))
(if (get-buffer-window buffer frame)
;; Try to avoid showing a buffer visible in some other window.
(or (buffer-live-p buffer)
(not (setq killed-buffers
(cons buffer killed-buffers))))
+ (or (null pred) (funcall pred buffer))
(not (eq buffer old-buffer)))
(if (and (not switch-to-visible-buffer)
(get-buffer-window buffer frame))