summaryrefslogtreecommitdiff
path: root/lisp/iswitchb.el
diff options
context:
space:
mode:
authorLeo Liu <sdl.web@gmail.com>2010-08-21 15:35:27 +0200
committerStefan Monnier <monnier@iro.umontreal.ca>2010-08-21 15:35:27 +0200
commite0143335522bda205591cab09407e3bec41c9a40 (patch)
treefc6d02c7d81d730ecbfa398659c5e63c2c3ec722 /lisp/iswitchb.el
parent8f081e96dec8821ecf3452237b74cfc7ee6a315b (diff)
downloademacs-e0143335522bda205591cab09407e3bec41c9a40.tar.gz
Fix buffer-list rename&refresh after after killing a buffer in ido.
* lisp/ido.el: Revert Óscar's. (ido-kill-buffer-at-head): Exit the minibuffer with ido-exit=refresh. Remember the buffers at head, rather than their name. * lisp/iswitchb.el (iswitchb-kill-buffer): Re-make the list.
Diffstat (limited to 'lisp/iswitchb.el')
-rw-r--r--lisp/iswitchb.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el
index ea4b00dc90d..081897a89b3 100644
--- a/lisp/iswitchb.el
+++ b/lisp/iswitchb.el
@@ -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)