[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/cape 8cf2942881 085/146: Add comments regarding interru
From: |
ELPA Syncer |
Subject: |
[elpa] externals/cape 8cf2942881 085/146: Add comments regarding interruptible completion tables |
Date: |
Sun, 9 Jan 2022 20:57:44 -0500 (EST) |
branch: externals/cape
commit 8cf294288187cbd6f1a42c0d510bc4712f664f65
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Add comments regarding interruptible completion tables
cc @jdtsmith
---
cape.el | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/cape.el b/cape.el
index d38e29c6f9..e2689a9f94 100644
--- a/cape.el
+++ b/cape.el
@@ -367,7 +367,10 @@ VALID is the input comparator, see `cape--input-valid-p'."
(lambda (str pred action)
(let ((new-input (buffer-substring-no-properties beg end)))
(when (or (eq input 'init) (not (cape--input-valid-p input new-input
valid)))
- (setq table (funcall fun new-input) input new-input)))
+ ;; NOTE: We have to make sure that the completion table is
interruptible.
+ ;; An interruption should not happen between the setqs.
+ (setq table (funcall fun new-input)
+ input new-input)))
(complete-with-action action table str pred))))
(defvar cape--file-properties
@@ -624,6 +627,8 @@ If INTERACTIVE is nil the function acts like a capf."
(lambda (str pred action)
(when (eq candidates 'init)
(clrhash ht)
+ ;; NOTE: Set `candidates' in the end, such that the
completion table is
+ ;; interruptible.
(setq candidates
(cl-loop for (table . plist) in tables nconc
(let* ((pred (plist-get plist :predicate))
@@ -715,6 +720,8 @@ VALID is the input comparator, see `cape--input-valid-p'."
(unless (cape--input-valid-p input new-input valid)
(pcase (funcall capf)
(`(,_beg ,_end ,new-table . ,_plist)
+ ;; NOTE: We have to make sure that the completion
table is interruptible.
+ ;; An interruption should not happen between the
setqs.
(setq table new-table input new-input)))))
(complete-with-action action table str pred)))
,@plist)))))
@@ -773,7 +780,8 @@ completion :category symbol can be specified."
(`(,beg ,end ,table . ,plist)
`(,beg ,end
,(lambda (str pred action)
- (cape--silent (complete-with-action action table str pred)))
+ (cape--silent
+ (complete-with-action action table str pred)))
,@plist)))))
;;;###autoload
@@ -784,7 +792,8 @@ completion :category symbol can be specified."
(`(,beg ,end ,table . ,plist)
`(,beg ,end
,(lambda (str pred action)
- (let (throw-on-input) (complete-with-action action table str
pred)))
+ (let (throw-on-input)
+ (complete-with-action action table str pred)))
,@plist)))))
;;;###autoload
- [elpa] externals/cape 8036636a0f 026/146: Add comment, (continued)
- [elpa] externals/cape 8036636a0f 026/146: Add comment, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 9bd7bed258 029/146: cape-company-capf: Call the backend later in the completion process, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 67c3b75e2a 039/146: Refactor dabbrev, simplify, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 6e525cdfdd 040/146: Rework cape-company-to-capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 6deb7d7a8b 044/146: Add docstrings, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 3ad6aa105e 045/146: cape-company-to-capf: Simplify, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 4a1f19af23 057/146: Fix super capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 26401bfa6a 069/146: Unify cape-abbrev and cape-abbrev-capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape d265a03e7f 074/146: cape-dabbrev: Make interactive, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 3eb7efc2d4 050/146: README: Expand reasoning, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 8cf2942881 085/146: Add comments regarding interruptible completion tables,
ELPA Syncer <=
- [elpa] externals/cape 488cfd9ed7 086/146: Move code around, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 2008d809b6 088/146: Add cape-capf-with-predicate, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 4b424150ef 090/146: cape-super-capf: Delete duplicates (Fix #13), ELPA Syncer, 2022/01/09
- [elpa] externals/cape da32e232d6 093/146: cape--company-call: Cheaper timeout checking, throw error, ELPA Syncer, 2022/01/09
- [elpa] externals/cape c4d821d55b 079/146: Add cape--symbol-annotation, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 2ce63259d7 097/146: Update README - Asynchronous Company backends work as expected, ELPA Syncer, 2022/01/09
- [elpa] externals/cape c1f7fa746b 104/146: Improve synchronization, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 1d69a06890 117/146: cape-tex/cape-sgml: Add autoloads, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 7f11b354df 124/146: cape-company-capf: Remove symbol restriction, ELPA Syncer, 2022/01/09
- [elpa] externals/cape a6db83b1bd 135/146: Improve repair function, ELPA Syncer, 2022/01/09