]> code.delx.au - gnu-emacs/blobdiff - lisp/iswitchb.el
(gdb-mouse-toggle-breakpoint-margin)
[gnu-emacs] / lisp / iswitchb.el
index ea4b00dc90dbca07634e99062fef13162de793d6..081897a89b3bb935de2ff6386d5cda0a4cdbd4a9 100644 (file)
@@ -1027,8 +1027,8 @@ Return the modified list with the last element prepended to it."
 (defun iswitchb-kill-buffer ()
   "Kill the buffer at the head of `iswitchb-matches'."
   (interactive)
-  (let ( (enable-recursive-minibuffers t)
-        buf)
+  (let ((enable-recursive-minibuffers t)
+        buf)
 
     (setq buf (car iswitchb-matches))
     ;; check to see if buf is non-nil.
@@ -1042,8 +1042,10 @@ Return the modified list with the last element prepended to it."
          (if (get-buffer buf)
              ;; buffer couldn't be killed.
              (setq iswitchb-rescan t)
-           ;; else buffer was killed so remove name from list.
-           (setq iswitchb-buflist  (delq buf iswitchb-buflist)))))))
+           ;; Else `kill-buffer' succeeds so re-make the buffer list
+           ;; taking into account packages like uniquify may rename
+           ;; buffers
+           (iswitchb-make-buflist iswitchb-default))))))
 
 ;;; VISIT CHOSEN BUFFER
 (defun iswitchb-visit-buffer (buffer)