[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/cape 9833045077 017/146: Add completion categories
From: |
ELPA Syncer |
Subject: |
[elpa] externals/cape 9833045077 017/146: Add completion categories |
Date: |
Sun, 9 Jan 2022 20:57:39 -0500 (EST) |
branch: externals/cape
commit 983304507782fbc4805eff8e6af145b399fa0909
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Add completion categories
---
cape.el | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/cape.el b/cape.el
index fb4507e0d6..a14a7fa36f 100644
--- a/cape.el
+++ b/cape.el
@@ -488,6 +488,7 @@
(lambda (str pred action)
(if (eq action 'metadata)
'(metadata
+ (category . cape-merged)
(display-sort-function . identity)
(cycle-sort-function . identity))
(complete-with-action action candidates str pred)))
@@ -535,16 +536,17 @@ This feature is experimental."
;; future is returned, the capf should fail first. As soon as
the future
;; callback is called, remember the result, refresh the UI and
return the
;; remembered result the next time the capf is called.
- (let ((sorted (cape--company-call backend 'sorted))
- (no-cache (cape--company-call backend 'no-cache))
+ (let ((no-cache (cape--company-call backend 'no-cache))
(dups (if (cape--company-call backend 'duplicates)
#'delete-dups #'identity))
- (candidates nil))
+ (candidates nil)
+ (metadata `(metadata (category . ,backend))))
+ (when (cape--company-call backend 'sorted)
+ (nconc metadata '((display-sort-function . identity)
+ (cycle-sort-function . identity))))
(list (- (point) (length input)) (point)
(lambda (str pred action)
- (if (and (eq action 'metadata) sorted)
- '(metadata
- (display-sort-function . identity)
- (cycle-sort-function . identity))
+ (if (eq action 'metadata)
+ metadata
(complete-with-action
action
(if no-cache
- [elpa] branch externals/cape created (now 5ccece0e34), ELPA Syncer, 2022/01/09
- [elpa] externals/cape 4b3f29e565 001/146: Initial commit, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 139ffe8720 002/146: Add license, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 8ed1e4e9cd 005/146: Remove parens from annotations, ELPA Syncer, 2022/01/09
- [elpa] externals/cape a8d00aa3ef 006/146: Add defcustoms, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 97eacd933d 016/146: README: Update example, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 9833045077 017/146: Add completion categories,
ELPA Syncer <=
- [elpa] externals/cape b3c5e4ec69 018/146: cape-merge-capfs: Fix sorting, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 26b822db0a 011/146: Add MELPA badges, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 84c128ae9b 013/146: Add cape-merge-capfs (Fix #2), ELPA Syncer, 2022/01/09
- [elpa] externals/cape 6c124b6cfd 015/146: README: Add some justification for the name :), ELPA Syncer, 2022/01/09
- [elpa] externals/cape 63ded5fde4 028/146: Improve cape-company-to-capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape f270456b5d 041/146: Improve cape-dabbrev-capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape a8e10cf7ae 014/146: Update README, ELPA Syncer, 2022/01/09
- [elpa] externals/cape d6b13d3055 027/146: Fix no-cache call, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 0e60999893 032/146: cape-ispell: Fix caching, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 7325c5002f 035/146: Update README, ELPA Syncer, 2022/01/09