diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-07-24 03:36:42 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-07-24 03:36:42 +0000 |
commit | ae5ac7d044747ee1133d35530dde01c7cb0fad34 (patch) | |
tree | 1eef9c4e723b4d62f8c266f241bae98068785058 /lisp/iswitchb.el | |
parent | 2c9210580bed526041b28f62b396122651fbf336 (diff) | |
download | emacs-ae5ac7d044747ee1133d35530dde01c7cb0fad34.tar.gz |
(iswitchb-get-bufname): Only add buffer of current
window if it is not already in list.
Diffstat (limited to 'lisp/iswitchb.el')
-rw-r--r-- | lisp/iswitchb.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index 4aa3803ea2a..9f184661442 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el @@ -697,9 +697,13 @@ current frame, rather than all frames, regardless of value of (defun iswitchb-get-bufname (win) "Used by `iswitchb-get-buffers-in-frames' to walk through all windows." - (setq iswitchb-bufs-in-frame - (cons (buffer-name (window-buffer win)) - iswitchb-bufs-in-frame))) + (let ((buf (buffer-name (window-buffer win)))) + (if (not (member buf iswitchb-bufs-in-frame)) + ;; Only add buf if it is not already in list. + ;; This prevents same buf in two different windows being + ;; put into the list twice. + (setq iswitchb-bufs-in-frame + (cons buf iswitchb-bufs-in-frame))))) ;;; FIND MATCHING BUFFERS |