mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 01:21:38 -05:00
Refactoring: ein:completer-finish-completing-ac can take SOURCES argument
This commit is contained in:
parent
4efb68e226
commit
723c8af780
1 changed files with 3 additions and 2 deletions
|
@ -105,7 +105,8 @@
|
|||
|
||||
;;; Completer interface
|
||||
|
||||
(defun ein:completer-finish-completing-ac (matched-text matches)
|
||||
(defun* ein:completer-finish-completing-ac
|
||||
(matched-text matches &optional (sources '(ac-source-ein-direct)))
|
||||
"Invoke completion using `auto-complete'.
|
||||
Only the argument MATCHES is used. MATCHED-TEXT is for
|
||||
compatibility with `ein:completer-finish-completing-default'."
|
||||
|
@ -118,7 +119,7 @@ compatibility with `ein:completer-finish-completing-default'."
|
|||
(setq ein:ac-direct-matches matches) ; let-binding won't work
|
||||
(setq ein:ac-cache-matches (append matches ein:ac-cache-matches))
|
||||
(run-with-idle-timer 1 nil #'ein:ac-clear-cache)
|
||||
(auto-complete '(ac-source-ein-direct))))
|
||||
(auto-complete sources)))
|
||||
|
||||
(defun ein:ac-clear-cache ()
|
||||
(setq ein:ac-cache-matches
|
||||
|
|
Loading…
Add table
Reference in a new issue