# HG changeset patch # User Juanma Barranquero # Date 1163122475 0 # Node ID 75ac3e7c76de16b8221392a3bca6c0c56fa5aa01 # Parent 775c7e45825287e193716277b2a8a7fa9e3f47a0 (bs--window-for-buffer): Remove. (bs--show-with-configuration): Use `get-window-with-predicate' instead of `bs--window-for-buffer'. diff -r 775c7e458252 -r 75ac3e7c76de lisp/bs.el --- a/lisp/bs.el Fri Nov 10 01:16:26 2006 +0000 +++ b/lisp/bs.el Fri Nov 10 01:34:35 2006 +0000 @@ -692,17 +692,6 @@ (interactive) (bs--redisplay t)) -(defun bs--window-for-buffer (buffer-name) - "Return a window showing a buffer with name BUFFER-NAME. -Take only windows of current frame into account. -Return nil if there is no such buffer." - (catch 'window - (walk-windows (lambda (w) - (when (string= (buffer-name (window-buffer w)) - buffer-name) - (throw 'window w)))) - nil)) - (defun bs--set-window-height () "Change the height of the selected window to suit the current buffer list." (unless (one-window-p t) @@ -1241,7 +1230,6 @@ (or (cdr bs--cycle-list) "this buffer")))))) - ;;;###autoload (defun bs-cycle-previous () "Select previous buffer defined by buffer cycling. @@ -1435,7 +1423,10 @@ ;; we have to set the buffer we started the command (setq bs--buffer-coming-from (current-buffer))) (let ((liste (bs-buffer-list)) - (active-window (bs--window-for-buffer "*buffer-selection*"))) + (active-window (get-window-with-predicate + (lambda (w) + (string= (buffer-name (window-buffer w)) + "*buffer-selection*"))))) (if active-window (select-window active-window) (modify-frame-parameters nil