mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 09:31:39 -05:00
Make ac-expand-on-... configurable in jedi-complete
Diff is big comparing to the actual change. ein:jedi-complete passes the value of ac-expand-on-auto-complete to the async callback and it can be specified via EXPAND keyword argument.
This commit is contained in:
parent
42508f6bc3
commit
f52228656b
1 changed files with 19 additions and 17 deletions
|
@ -48,25 +48,27 @@
|
|||
d))
|
||||
|
||||
;;;###autoload
|
||||
(defun ein:jedi-complete ()
|
||||
(defun* ein:jedi-complete (&key (expand ac-expand-on-auto-complete))
|
||||
"Run completion using candidates calculated by EIN and Jedi."
|
||||
(interactive)
|
||||
(deferred:$
|
||||
(deferred:parallel ; or `deferred:earlier' is better?
|
||||
(jedi:complete-request)
|
||||
(ein:jedi--completer-complete))
|
||||
(deferred:nextc it
|
||||
(lambda (replies)
|
||||
(destructuring-bind
|
||||
(_ ; ignore `jedi:complete-request' what returns.
|
||||
((&key matched_text matches &allow-other-keys) ; :complete_reply
|
||||
_)) ; ignore metadata
|
||||
replies
|
||||
(if matches
|
||||
(ein:completer-finish-completing-ac
|
||||
matched_text matches
|
||||
ein:jedi-dot-complete-sources)
|
||||
(auto-complete ein:jedi-dot-complete-sources)))))))
|
||||
(lexical-let ((expand expand))
|
||||
(deferred:$
|
||||
(deferred:parallel ; or `deferred:earlier' is better?
|
||||
(jedi:complete-request)
|
||||
(ein:jedi--completer-complete))
|
||||
(deferred:nextc it
|
||||
(lambda (replies)
|
||||
(destructuring-bind
|
||||
(_ ; ignore `jedi:complete-request' what returns.
|
||||
((&key matched_text matches &allow-other-keys) ; :complete_reply
|
||||
_)) ; ignore metadata
|
||||
replies
|
||||
(let ((ac-expand-on-auto-complete expand))
|
||||
(if matches
|
||||
(ein:completer-finish-completing-ac
|
||||
matched_text matches
|
||||
ein:jedi-dot-complete-sources)
|
||||
(auto-complete ein:jedi-dot-complete-sources)))))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun ein:jedi-dot-complete ()
|
||||
|
|
Loading…
Add table
Reference in a new issue