Less intrusive company completion

This commit is contained in:
Henrik Lissner 2016-02-23 13:11:00 -05:00
parent 3ce43bf173
commit 4c0e39c9ce
2 changed files with 12 additions and 4 deletions

View file

@ -48,7 +48,15 @@
(defun narf/company-dict-or-keywords ()
(interactive)
(let ((company-backends '((company-keywords company-dict))))
(call-interactively 'company-complete-common)))
(call-interactively 'company-complete)))
;;;###autoload
(defun narf/company-complete ()
"Bring up the completion popup. If there is only one result, auto-complete it."
(interactive)
(when (and (company-manual-begin)
(= company-candidates-length 1))
(company-complete-common)))
(provide 'defuns-company)
;;; defuns-company.el ends here