mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 01:21:38 -05:00
Rename: ein-cached -> ein-async
This commit is contained in:
parent
5845dc6e35
commit
a1ddf7a7a9
2 changed files with 8 additions and 3 deletions
|
@ -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.
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue