diff options
| author | Juanma Barranquero | 2006-11-10 01:36:05 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2006-11-10 01:36:05 +0000 |
| commit | edf6fbc5f7f2dd9bf329477fd81e2c97b1cbb86c (patch) | |
| tree | 307322c9dbf8022150fa30310bb1cfd2ee628ddb /lisp/bs.el | |
| parent | 52f9b7513ffbfe49e0ddbe24ecef816e1a134860 (diff) | |
| download | emacs-edf6fbc5f7f2dd9bf329477fd81e2c97b1cbb86c.tar.gz emacs-edf6fbc5f7f2dd9bf329477fd81e2c97b1cbb86c.zip | |
(bs--window-for-buffer): Remove.
(bs--show-with-configuration): Use `get-window-with-predicate' instead of
`bs--window-for-buffer'.
Diffstat (limited to 'lisp/bs.el')
| -rw-r--r-- | lisp/bs.el | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/lisp/bs.el b/lisp/bs.el index cf6ca0c2de3..d0b929b2d85 100644 --- a/lisp/bs.el +++ b/lisp/bs.el | |||
| @@ -692,17 +692,6 @@ Refresh whole Buffer Selection Menu." | |||
| 692 | (interactive) | 692 | (interactive) |
| 693 | (bs--redisplay t)) | 693 | (bs--redisplay t)) |
| 694 | 694 | ||
| 695 | (defun bs--window-for-buffer (buffer-name) | ||
| 696 | "Return a window showing a buffer with name BUFFER-NAME. | ||
| 697 | Take only windows of current frame into account. | ||
| 698 | Return nil if there is no such buffer." | ||
| 699 | (catch 'window | ||
| 700 | (walk-windows (lambda (w) | ||
| 701 | (when (string= (buffer-name (window-buffer w)) | ||
| 702 | buffer-name) | ||
| 703 | (throw 'window w)))) | ||
| 704 | nil)) | ||
| 705 | |||
| 706 | (defun bs--set-window-height () | 695 | (defun bs--set-window-height () |
| 707 | "Change the height of the selected window to suit the current buffer list." | 696 | "Change the height of the selected window to suit the current buffer list." |
| 708 | (unless (one-window-p t) | 697 | (unless (one-window-p t) |
| @@ -1241,7 +1230,6 @@ by buffer configuration `bs-cycle-configuration-name'." | |||
| 1241 | (or (cdr bs--cycle-list) | 1230 | (or (cdr bs--cycle-list) |
| 1242 | "this buffer")))))) | 1231 | "this buffer")))))) |
| 1243 | 1232 | ||
| 1244 | |||
| 1245 | ;;;###autoload | 1233 | ;;;###autoload |
| 1246 | (defun bs-cycle-previous () | 1234 | (defun bs-cycle-previous () |
| 1247 | "Select previous buffer defined by buffer cycling. | 1235 | "Select previous buffer defined by buffer cycling. |
| @@ -1435,7 +1423,10 @@ for buffer selection." | |||
| 1435 | ;; we have to set the buffer we started the command | 1423 | ;; we have to set the buffer we started the command |
| 1436 | (setq bs--buffer-coming-from (current-buffer))) | 1424 | (setq bs--buffer-coming-from (current-buffer))) |
| 1437 | (let ((liste (bs-buffer-list)) | 1425 | (let ((liste (bs-buffer-list)) |
| 1438 | (active-window (bs--window-for-buffer "*buffer-selection*"))) | 1426 | (active-window (get-window-with-predicate |
| 1427 | (lambda (w) | ||
| 1428 | (string= (buffer-name (window-buffer w)) | ||
| 1429 | "*buffer-selection*"))))) | ||
| 1439 | (if active-window | 1430 | (if active-window |
| 1440 | (select-window active-window) | 1431 | (select-window active-window) |
| 1441 | (modify-frame-parameters nil | 1432 | (modify-frame-parameters nil |