2015-06-15 09:05:52 +02:00
|
|
|
;;; defuns-company.el
|
|
|
|
|
|
|
|
;;;###autoload
|
2015-10-14 02:13:42 -04:00
|
|
|
(defun narf/company-evil-complete-next (&optional arg)
|
2015-06-15 09:05:52 +02:00
|
|
|
(call-interactively 'company-dabbrev)
|
|
|
|
(if (eq company-candidates-length 1)
|
|
|
|
(company-complete)))
|
|
|
|
|
|
|
|
;;;###autoload
|
2015-10-14 02:13:42 -04:00
|
|
|
(defun narf/company-evil-complete-previous (&optional arg)
|
2015-06-15 09:05:52 +02:00
|
|
|
(let ((company-selection-wrap-around t))
|
|
|
|
(call-interactively 'company-dabbrev)
|
|
|
|
(if (eq company-candidates-length 1)
|
|
|
|
(company-complete)
|
|
|
|
(call-interactively 'company-select-previous))))
|
|
|
|
|
2015-10-14 03:39:32 -04:00
|
|
|
;;;###autoload
|
|
|
|
(defun narf/company-complete-common-or-complete-full ()
|
|
|
|
(interactive)
|
|
|
|
(when (company-manual-begin)
|
|
|
|
(if (eq last-command #'company-complete-common-or-cycle)
|
|
|
|
(let ((company-selection-wrap-around t))
|
|
|
|
(call-interactively #'company-complete-selection))
|
|
|
|
(let ((buffer-mod-tick (buffer-chars-modified-tick)))
|
|
|
|
(call-interactively #'company-complete-common)
|
|
|
|
(when (= buffer-mod-tick (buffer-chars-modified-tick))
|
|
|
|
(call-interactively #'company-complete-selection)
|
|
|
|
(call-interactively #'company-complete))))))
|
|
|
|
|
2015-06-15 09:05:52 +02:00
|
|
|
(provide 'defuns-company)
|
|
|
|
;;; defuns-company.el ends here
|