aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-24 03:36:42 +0000
committerRichard M. Stallman1997-07-24 03:36:42 +0000
commitae5ac7d044747ee1133d35530dde01c7cb0fad34 (patch)
tree1eef9c4e723b4d62f8c266f241bae98068785058
parent2c9210580bed526041b28f62b396122651fbf336 (diff)
downloademacs-ae5ac7d044747ee1133d35530dde01c7cb0fad34.tar.gz
emacs-ae5ac7d044747ee1133d35530dde01c7cb0fad34.zip
(iswitchb-get-bufname): Only add buffer of current
window if it is not already in list.
-rw-r--r--lisp/iswitchb.el10
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
697 697
698(defun iswitchb-get-bufname (win) 698(defun iswitchb-get-bufname (win)
699 "Used by `iswitchb-get-buffers-in-frames' to walk through all windows." 699 "Used by `iswitchb-get-buffers-in-frames' to walk through all windows."
700 (setq iswitchb-bufs-in-frame 700 (let ((buf (buffer-name (window-buffer win))))
701 (cons (buffer-name (window-buffer win)) 701 (if (not (member buf iswitchb-bufs-in-frame))
702 iswitchb-bufs-in-frame))) 702 ;; Only add buf if it is not already in list.
703 ;; This prevents same buf in two different windows being
704 ;; put into the list twice.
705 (setq iswitchb-bufs-in-frame
706 (cons buf iswitchb-bufs-in-frame)))))
703 707
704 708
705;;; FIND MATCHING BUFFERS 709;;; FIND MATCHING BUFFERS