[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/cape 26401bfa6a 069/146: Unify cape-abbrev and cape-abb
From: |
ELPA Syncer |
Subject: |
[elpa] externals/cape 26401bfa6a 069/146: Unify cape-abbrev and cape-abbrev-capf |
Date: |
Sun, 9 Jan 2022 20:57:43 -0500 (EST) |
branch: externals/cape
commit 26401bfa6a57b055ef52441c1ae106c7fc243e83
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Unify cape-abbrev and cape-abbrev-capf
---
cape.el | 30 ++++++++++++++----------------
1 file changed, 14 insertions(+), 16 deletions(-)
diff --git a/cape.el b/cape.el
index a9c7c6bb61..6f115e48f5 100644
--- a/cape.el
+++ b/cape.el
@@ -457,7 +457,7 @@ SORT should be nil to disable sorting."
(defvar cape--ispell-properties
(list :annotation-function (lambda (_) " Ispell")
:company-kind (lambda (_) 'text))
- "Completion extra properties for `cape-ispell-capf'.")
+ "Completion extra properties for `cape-ispell'.")
(declare-function ispell-lookup-words "ispell")
(defun cape--ispell-words (str)
@@ -487,7 +487,7 @@ If INTERACTIVE is nil the function acts like a capf."
(defvar cape--dict-properties
(list :annotation-function (lambda (_) " Dict")
:company-kind (lambda (_) 'text))
- "Completion extra properties for `cape-dict-capf'.")
+ "Completion extra properties for `cape-dict'.")
(defvar cape--dict-table nil)
(defun cape--dict-table ()
@@ -532,22 +532,20 @@ If INTERACTIVE is nil the function acts like a capf."
(list :annotation-function #'cape--abbrev-annotation
:exit-function (lambda (&rest _) (expand-abbrev))
:company-kind (lambda (_) 'snippet))
- "Completion extra properties for `cape-abbrev-capf'.")
+ "Completion extra properties for `cape-abbrev'.")
;;;###autoload
-(defun cape-abbrev-capf ()
- "Abbrev completion-at-point-function."
- (when-let ((bounds (bounds-of-thing-at-point 'symbol))
- (abbrevs (cape--abbrev-table)))
- `(,(car bounds) ,(cdr bounds) ,abbrevs :exclusive no
,@cape--abbrev-properties)))
-
-;;;###autoload
-(defun cape-abbrev ()
- "Complete abbreviation at point."
- (interactive)
- (cape--complete-thing 'symbol (or (cape--abbrev-table)
- (user-error "No abbreviations"))
- cape--abbrev-properties))
+(defun cape-abbrev (&optional interactive)
+ "Complete abbreviation at point.
+If INTERACTIVE is nil the function acts like a capf."
+ (interactive (list t))
+ (if interactive
+ (cape--complete-thing 'symbol (or (cape--abbrev-table)
+ (user-error "No abbreviations"))
+ cape--abbrev-properties)
+ (when-let ((bounds (bounds-of-thing-at-point 'symbol))
+ (abbrevs (cape--abbrev-table)))
+ `(,(car bounds) ,(cdr bounds) ,abbrevs :exclusive no
,@cape--abbrev-properties))))
(defun cape--keyword-table ()
"Return keywords for current major mode."
- [elpa] externals/cape 673b086dae 056/146: Annotate abbreviations with expansion, (continued)
- [elpa] externals/cape 673b086dae 056/146: Annotate abbreviations with expansion, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 6ff72e5253 067/146: Unify cape-ispell and cape-ispell-capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape d3e4d152ac 024/146: Add cape-symbol, ELPA Syncer, 2022/01/09
- [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 <=
- [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, 2022/01/09
- [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