Rename: ein-cached -> ein-async

This commit is contained in:
Takafumi Arakaki 2013-06-11 20:34:28 +02:00
parent 5845dc6e35
commit a1ddf7a7a9
2 changed files with 8 additions and 3 deletions

View file

@ -94,13 +94,18 @@ Maximum number of cache to store."
(prefix . ein:ac-chunk-beginning)
(symbol . "s")))
(ac-define-source ein-cached
(ac-define-source ein-async
'((candidates . ein:ac-direct-get-matches)
(requires . 0)
(prefix . ein:ac-chunk-beginning)
(init . ein:ac-request-in-background)
(symbol . "c")))
(define-obsolete-function-alias 'ac-complete-ein-cached 'ac-complete-ein-async
"0.2.1")
(define-obsolete-variable-alias 'ac-source-ein-cached 'ac-source-ein-async
"0.2.1")
(defun ein:ac-request-in-background ()
(ein:and-let* ((kernel (ein:get-kernel))
((ein:kernel-live-p kernel)))
@ -200,7 +205,7 @@ first candidate when the `ac-menu' pops up."
(defun ein:ac-setup ()
"Call this function from mode hook (see `ein:ac-config')."
(setq ac-sources (append '(ac-source-ein-cached) ein:ac-sources)))
(setq ac-sources (append '(ac-source-ein-async) ein:ac-sources)))
(defun ein:ac-setup-maybe ()
"Setup `ac-sources' for mumamo.

View file

@ -204,7 +204,7 @@ notebooks."
(not ein:%connect%))
(let ((connection (ein:connect-setup notebook buffer)))
(when (ein:eval-if-bound 'ac-sources)
(push 'ac-source-ein-cached ac-sources))
(push 'ac-source-ein-async ac-sources))
(ein:connect-mode)
(ein:log 'info "Connected to %s"
(ein:$notebook-notebook-name notebook))