# HG changeset patch # User Richard M. Stallman # Date 869715402 0 # Node ID fff55212f6a730b1d17f95113466486ea9dfefb8 # Parent 45fd6af9ccdeb87d8fc4de3b4d475db7dd29e6f6 (iswitchb-get-bufname): Only add buffer of current window if it is not already in list. diff -r 45fd6af9ccde -r fff55212f6a7 lisp/iswitchb.el --- a/lisp/iswitchb.el Wed Jul 23 21:41:47 1997 +0000 +++ b/lisp/iswitchb.el Thu Jul 24 03:36:42 1997 +0000 @@ -697,9 +697,13 @@ (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