From: Juanma Barranquero Date: Fri, 10 Nov 2006 01:36:05 +0000 (+0000) Subject: (bs--window-for-buffer): Remove. X-Git-Tag: emacs-pretest-22.0.91~190 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/edf6fbc5f7f2dd9bf329477fd81e2c97b1cbb86c?hp=52f9b7513ffbfe49e0ddbe24ecef816e1a134860 (bs--window-for-buffer): Remove. (bs--show-with-configuration): Use `get-window-with-predicate' instead of `bs--window-for-buffer'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cb97fa9d3d..add015be45 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2006-11-10 Juanma Barranquero + + * bs.el (bs--window-for-buffer): Remove. + (bs--show-with-configuration): Use `get-window-with-predicate' + instead of `bs--window-for-buffer'. + 2006-11-10 Kenichi Handa * files.el (revert-buffer): Fix previous change. diff --git a/lisp/bs.el b/lisp/bs.el index cf6ca0c2de..d0b929b2d8 100644 --- a/lisp/bs.el +++ b/lisp/bs.el @@ -692,17 +692,6 @@ Refresh whole Buffer Selection Menu." (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 @@ by buffer configuration `bs-cycle-configuration-name'." (or (cdr bs--cycle-list) "this buffer")))))) - ;;;###autoload (defun bs-cycle-previous () "Select previous buffer defined by buffer cycling. @@ -1435,7 +1423,10 @@ for buffer selection." ;; 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