when user presses RETURN to select buffer) before running:
;; This happens for example if the buffer was chosen with the mouse.
(setq iswitchb-matches (list iswitchb-final-text)))
iswitchb-exit-minibuffer: set iswitchb-exit to 'usefirst.
These changes were made to fix the following bug reported by Markus
Rost and John Wiegley:
Evaluate:
(progn
(iswitchb-mode 1)
(get-buffer-create "12")
(get-buffer-create "1")
(iswitchb-buffer))
You get prompted in the minibuffer. Type "1". The minibuffer shows
iswitch 1{12,1}
Hit RET. You find yourself in buffer "1" instead of "12", as you
would expect from the documentation.
This bug was introduced when iswitchb-read-buffer was updated to allow
user to select items from the *Completions* buffer with the mouse.
iswitchb-prepost-hooks. Remove iswitchb-xemacs variable and use
(featurep 'xemacs) and fboundp instead. (From Stefan Monnier).
(iswitchb-completions): Remove two redundant arguments and local
variables. (From Stefan Monnier).
Commentary fix (from Markus Rost).
(iswitchb): Fix the case where the result was selected with the mouse.
(iswitchb-completion-help): Use the normal *Completions* now that
mouse selection works.
(iswitchb-minibuffer-setup): Simplify.
(iswitchb-read-buffer): Record in iswitchb-minibuf-depth the value
we expect to be returned by minibuffer-depth once we prompt the
user in the minibuffer.
(iswitchb-entryfn-p): If minibuffer-depth returns the same value
as recorded in iswitchb-minibuf-depth, return non-nil.
of testing if iswitchb-prepost-hooks is bound, because the
latter will always be true when invoking a recursive minibuffer
from an active Iswitchb buffer.
variable. If non-nil, order the buffer list according to the
currently selected frame.
(iswitchb-make-buflist): If iswitchb-use-frame-buffer-list is
non-nil, pass the selected frame to function buffer-list.
(iswitchb-method): No longer a user variable.
(iswitchb-minibuffer-setup-hook): Customized.
(iswitchb-default): New variable.
(iswitchb-complete): Use iswitchb-common-match-string rather than recomputing
the value.
(iswitchb-toggle-ignore): Recompute list of buffers.
(iswitchb-init-XEmacs-trick): Renamed from iswitchb-init-Xemacs-trick.
(iswitchb): New variable for use by the custom package.
(iswitchb-default-buffer): Variable deleted.
(iswitchb-define-mode-map): Addition of keybindings
for iswitchb-kill-buffer and iswitchb-find-file.
(iswitchb): When no text typed in, show all buffers.
(iswitchb-complete): Use equal rather than eq.
(iswitchb-next-match, iswitchb-prev-match): Use
iswitchb-chop to handle reordering the buffer list.
(iswitchb-chop): New function.
(iswitchb-make-buflist): Rewritten for efficiency.
(iswitchb-to-end): Operate on a list of buffers, not just one.
(iswitchb-set-matches): Always return list
of matching buffers, even in absence of user input.
(iswitchb-kill-buffer): New function.
(iswitchb-default-keybindings): Use read-kbd-macro for keys to define.
(iswitchb-exhibit): Always return list of matching buffers.
(iswitchb-show-default-buffer): Function deleted.