[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/cape 241dde47ca 070/146: Unify cape-keyword and cape-ke
From: |
ELPA Syncer |
Subject: |
[elpa] externals/cape 241dde47ca 070/146: Unify cape-keyword and cape-keyword-capf |
Date: |
Sun, 9 Jan 2022 20:57:43 -0500 (EST) |
branch: externals/cape
commit 241dde47ca9377794691c399d5d65a181e716f82
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Unify cape-keyword and cape-keyword-capf
---
cape.el | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/cape.el b/cape.el
index 6f115e48f5..e8a6f79608 100644
--- a/cape.el
+++ b/cape.el
@@ -556,23 +556,22 @@ If INTERACTIVE is nil the function acts like a capf."
(defvar cape--keyword-properties
(list :annotation-function (lambda (_) " Keyword")
:company-kind (lambda (_) 'keyword))
- "Completion extra properties for `cape-keyword-capf'.")
+ "Completion extra properties for `cape-keyword'.")
;;;###autoload
-(defun cape-keyword-capf ()
- "Dictionary completion-at-point-function."
- (when-let ((bounds (bounds-of-thing-at-point 'symbol))
- (keywords (cape--keyword-table)))
- `(,(car bounds) ,(cdr bounds) ,keywords :exclusive no
,@cape--keyword-properties)))
-
-;;;###autoload
-(defun cape-keyword ()
- "Complete word at point."
- (interactive)
- (cape--complete-thing 'symbol
- (or (cape--keyword-table)
- (user-error "No keywords for %s" major-mode))
- cape--keyword-properties))
+(defun cape-keyword (&optional interactive)
+ "Complete word at point.
+If INTERACTIVE is nil the function acts like a capf."
+ (interactive (list t))
+ (if interactive
+ (cape--complete-thing 'symbol
+ (or (cape--keyword-table)
+ (user-error "No keywords for %s" major-mode))
+ cape--keyword-properties)
+ (when-let ((bounds (bounds-of-thing-at-point 'symbol))
+ (keywords (cape--keyword-table)))
+ `(,(car bounds) ,(cdr bounds) ,keywords
+ :exclusive no ,@cape--keyword-properties))))
(defun cape--super-function (ht prop)
"Return merged function for PROP given HT."
- [elpa] externals/cape a6db83b1bd 135/146: Improve repair function, (continued)
- [elpa] externals/cape a6db83b1bd 135/146: Improve repair function, ELPA Syncer, 2022/01/09
- [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 <=
- [elpa] externals/cape eaa408779e 072/146: cape-symbol: Implement capf, ELPA Syncer, 2022/01/09
- [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