[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/cape eaa408779e 072/146: cape-symbol: Implement capf
From: |
ELPA Syncer |
Subject: |
[elpa] externals/cape eaa408779e 072/146: cape-symbol: Implement capf |
Date: |
Sun, 9 Jan 2022 20:57:43 -0500 (EST) |
branch: externals/cape
commit eaa408779e322e24992eab858062285e7d7edea9
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
cape-symbol: Implement capf
---
cape.el | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/cape.el b/cape.el
index 5671fdd956..4b63503cb7 100644
--- a/cape.el
+++ b/cape.el
@@ -402,12 +402,17 @@ If INTERACTIVE is nil the function acts like a capf."
(t 'text)))
;;;###autoload
-(defun cape-symbol ()
- "Complete symbol at point."
- (interactive)
- (cape--complete-thing 'symbol
- (cape--table-with-properties obarray :category 'symbol)
- cape--symbol-properties))
+(defun cape-symbol (&optional interactive)
+ "Complete symbol at point.
+If INTERACTIVE is nil the function acts like a capf."
+ (interactive (list t))
+ (if interactive
+ (cape--complete-thing 'symbol
+ (cape--table-with-properties obarray :category
'symbol)
+ cape--symbol-properties)
+ (when-let (bounds (bounds-of-thing-at-point 'symbol))
+ `(,(car bounds) ,(cdr bounds) ,obarray
+ :exclusive no ,@cape--symbol-properties))))
(defvar cape--dabbrev-properties
(list :annotation-function (lambda (_) " Dabbrev")
- [elpa] externals/cape f26e835929 131/146: README: Do not use hashed symbol, (continued)
- [elpa] externals/cape f26e835929 131/146: README: Do not use hashed symbol, ELPA Syncer, 2022/01/09
- [elpa] externals/cape e23226cb1c 022/146: cape-file-capf: Add company-prefix-length=t after slash (Fix #8), ELPA Syncer, 2022/01/09
- [elpa] externals/cape e2fd7c1cc6 038/146: Minor refactoring, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 3beed4f37c 047/146: Use cape--silent, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 12f5ae008c 051/146: Update README, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 1b4b739639 059/146: Refactoring, ELPA Syncer, 2022/01/09
- [elpa] externals/cape b63deab5af 058/146: cape--cached-table: Add category, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 11bcf51724 064/146: Ensure that cape-line is not sorted, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 33850ae000 068/146: Unify cape-dict and cape-dict-capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 241dde47ca 070/146: Unify cape-keyword and cape-keyword-capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape eaa408779e 072/146: cape-symbol: Implement capf,
ELPA Syncer <=
- [elpa] externals/cape eff4f34841 084/146: Add cape-noninterruptible-capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape fd8828cff3 100/146: Make cape--company-call more robust, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 1d0d3abbd1 102/146: Use namespaced symbol, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 4aec140c08 109/146: Minor cleanup, ELPA Syncer, 2022/01/09
- [elpa] externals/cape b3e2850fcf 108/146: Add unwind-protect, ELPA Syncer, 2022/01/09
- [elpa] externals/cape e81e3cfd4e 112/146: Indent, ELPA Syncer, 2022/01/09
- [elpa] externals/cape b895c8cf28 114/146: cape-capf-case-fold: Add dont-fold, ELPA Syncer, 2022/01/09
- [elpa] externals/cape c0343a247c 123/146: cape-tex/sgml: Improve docsig, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 6d076f2480 129/146: README: Document company--multi-backend-adapter, ELPA Syncer, 2022/01/09
- [elpa] externals/cape c8c0a9f9a6 134/146: Simplify, ELPA Syncer, 2022/01/09