Function: ido-complete-space

ido-complete-space is an interactive and byte-compiled function defined in ido.el.gz.

Signature

(ido-complete-space)

Documentation

Try completion unless inserting the space makes sense.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/ido.el.gz
(defun ido-complete-space ()
  "Try completion unless inserting the space makes sense."
  (interactive)
  (if (and (stringp ido-common-match-string)
	   (stringp ido-text)
	   (cond
	    ((> (length ido-common-match-string) (length ido-text))
	     (= (aref ido-common-match-string (length ido-text)) ? ))
	    (ido-matches
	     (let (insert-space
		   (re (concat (regexp-quote ido-text) " "))
		   (comp ido-matches))
	       (while comp
		 (if (string-match re (ido-name (car comp)))
		     (setq comp nil insert-space t)
		   (setq comp (cdr comp))))
	       insert-space))
	    (t nil)))
      (insert " ")
    (ido-complete)))