Function: semantic-complete-inline-done

semantic-complete-inline-done is an interactive and byte-compiled function defined in complete.el.gz.

Signature

(semantic-complete-inline-done)

Documentation

This completion thing is DONE, OR, insert a newline.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/complete.el.gz
(defun semantic-complete-inline-done ()
  "This completion thing is DONE, OR, insert a newline."
  (interactive)
  (let* ((displayer semantic-completion-display-engine)
	 (tag (semantic-displayer-current-focus displayer)))
    (if tag
	(let ((txt (semantic-completion-text)))
	  (insert (substring (semantic-tag-name tag)
			     (length txt)))
	  (semantic-complete-inline-exit))

      ;; Get whatever binding RET usually has.
      (let ((fcn
	     (condition-case nil
		 (lookup-key (current-active-maps) (this-command-keys))
	       (error
		;; I don't know why, but for some reason the above
		;; throws an error sometimes.
		(lookup-key (current-global-map) (this-command-keys))
		))))
	(when fcn
	  (funcall fcn)))
      )))