Function: iswitchb-complete
iswitchb-complete is an interactive and byte-compiled function defined
in iswitchb.el.gz.
Signature
(iswitchb-complete)
Documentation
Try and complete the current pattern amongst the buffer names.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/iswitchb.el.gz
(defun iswitchb-complete ()
"Try and complete the current pattern amongst the buffer names."
(interactive)
(let (res)
(cond ((not iswitchb-matches)
(run-hooks 'iswitchb-cannot-complete-hook))
(iswitchb-invalid-regexp
;; Do nothing
)
((= 1 (length iswitchb-matches))
;; only one choice, so select it.
(exit-minibuffer))
(t
;; else there could be some completions
(setq res iswitchb-common-match-string)
(if (and (not (memq res '(t nil)))
(not (equal res iswitchb-text)))
;; found something to complete, so put it in the minibuffer.
(progn
(setq iswitchb-rescan nil
iswitchb-common-match-inserted t)
(delete-region (minibuffer-prompt-end) (point))
(insert res))
;; else nothing to complete
(run-hooks 'iswitchb-cannot-complete-hook)
)))))