[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/cape ac65f2acdf 048/146: Add autoloads, renamings, READ
From: |
ELPA Syncer |
Subject: |
[elpa] externals/cape ac65f2acdf 048/146: Add autoloads, renamings, README |
Date: |
Sun, 9 Jan 2022 20:57:41 -0500 (EST) |
branch: externals/cape
commit ac65f2acdf9340aa11379d5904172480acae4ca5
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Add autoloads, renamings, README
---
README.org | 5 +++++
cape.el | 21 ++++++++++++---------
2 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/README.org b/README.org
index 5617126986..a8db5d7845 100644
--- a/README.org
+++ b/README.org
@@ -111,3 +111,8 @@ circumstances.
(setq-local completion-at-point-functions
(list (cape-capf-buster #'some-caching-capf)))
#+end_src
+
+** Other Capf transformers
+
+- ~cape-silent-capf~: Wrap a chatty Capf and silence it.
+- ~cape-capf-with-properties~: Add completion properties to a Capf.
diff --git a/cape.el b/cape.el
index 3b78239faf..da7b194a74 100644
--- a/cape.el
+++ b/cape.el
@@ -526,7 +526,7 @@ METADATA is optional completion metadata."
(user-error "No keywords for %s" major-mode))
cape--keyword-properties))
-(defun cape--merged-function (ht prop)
+(defun cape--super-function (ht prop)
"Return merged function for PROP given HT."
(lambda (x)
(when-let (fun (plist-get (gethash x ht) prop))
@@ -557,7 +557,7 @@ METADATA is optional completion metadata."
(lambda (str pred action)
(if (eq action 'metadata)
'(metadata
- (category . cape-merged)
+ (category . cape-super)
(display-sort-function . identity)
(cycle-sort-function . identity))
(when (eq candidates 'init)
@@ -573,13 +573,13 @@ METADATA is optional completion metadata."
(complete-with-action action candidates str pred)))
:exclusive 'no
:company-prefix-length prefix-len
- :company-doc-buffer (cape--merged-function ht
:company-doc-buffer)
- :company-location (cape--merged-function ht :company-location)
- :company-docsig (cape--merged-function ht :company-docsig)
- :company-deprecated (cape--merged-function ht
:company-deprecated)
- :company-kind (cape--merged-function ht :company-kind)
- :annotation-function (cape--merged-function ht
:annotation-function)
- :exit-function (lambda (x _status) (funcall
(cape--merged-function ht :exit-function) x)))))))
+ :company-doc-buffer (cape--super-function ht :company-doc-buffer)
+ :company-location (cape--super-function ht :company-location)
+ :company-docsig (cape--super-function ht :company-docsig)
+ :company-deprecated (cape--super-function ht :company-deprecated)
+ :company-kind (cape--super-function ht :company-kind)
+ :annotation-function (cape--super-function ht
:annotation-function)
+ :exit-function (lambda (x _status) (funcall
(cape--super-function ht :exit-function) x)))))))
(defun cape--company-call (backend &rest args)
"Call Company BACKEND with ARGS."
@@ -639,6 +639,7 @@ This feature is experimental."
:annotation-function (lambda (x) (cape--company-call backend
'annotation x))
:exit-function (lambda (x _status) (cape--company-call backend
'post-completion x))))))))
+;;;###autoload
(defun cape-capf-buster (capf &optional cmp)
"Return transformed CAPF where the cache is busted on input change.
See `cape--input-changed-p' for the CMP argument."
@@ -674,6 +675,7 @@ The CMP argument determines how the new input is compared
to the old input.
('equal (equal old-input new-input))
('substring (string-match-p (regexp-quote old-input)
new-input))))))
+;;;###autoload
(defun cape-capf-with-properties (capf &rest properties)
"Return a new CAPF with additional completion PROPERTIES.
Completion properties include for example :exclusive, :annotation-function
@@ -683,6 +685,7 @@ and the various :company-* extensions."
(`(,beg ,end ,table . ,plist)
`(,beg ,end ,table ,@properties ,@plist)))))
+;;;###autoload
(defun cape-silent-capf (capf)
"Return a new CAPF which is silent (no messages, no errors)."
(lambda ()
- [elpa] externals/cape c0343a247c 123/146: cape-tex/sgml: Improve docsig, (continued)
- [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
- [elpa] externals/cape 5319e343bb 136/146: Improve repair function, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 12b00151d1 143/146: Improve and simplify cape-dabbrev, ELPA Syncer, 2022/01/09
- [elpa] externals/cape be2014538a 144/146: cape-dabbrev: Use thing-at-point-looking-at, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 5ccece0e34 146/146: Add to GNU ELPA, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 700c9d7bc2 137/146: Remove cape-repair-misbehaving-capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape bc1c1ee9fc 140/146: Make cape-tex etc less aggressive, add cape-tex-prefix-required variable, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 8726bc7246 138/146: cape--interactive: Simplify, ELPA Syncer, 2022/01/09
- [elpa] externals/cape ac65f2acdf 048/146: Add autoloads, renamings, README,
ELPA Syncer <=
- [elpa] externals/cape 0a05e51d2a 053/146: Add cape-capf-with-predicate (See #9), ELPA Syncer, 2022/01/09
- [elpa] externals/cape 75cb8c799a 071/146: Unify cape-file and cape-file-capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 1d72f84b64 046/146: Add cape-capf-with-properties and cape-silent-capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 693a376913 054/146: Revert "Add cape-capf-with-predicate (See #9)", ELPA Syncer, 2022/01/09
- [elpa] externals/cape 8a2cc4c7bb 060/146: Add completion categories, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 496bb4a5e4 065/146: Rename function, ELPA Syncer, 2022/01/09
- [elpa] externals/cape ba85197981 075/146: Update README, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 202345e954 083/146: cape-capf-with-properties: Add support for :sort and :category, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 15491cef1a 087/146: Add link to Emacs, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 659f710682 089/146: Add comment, ELPA Syncer, 2022/01/09