[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/orderless 6ada0ad21c 035/204: Add docstrings to functio
From: |
ELPA Syncer |
Subject: |
[elpa] externals/orderless 6ada0ad21c 035/204: Add docstrings to functions |
Date: |
Tue, 11 Jan 2022 12:58:15 -0500 (EST) |
branch: externals/orderless
commit 6ada0ad21c59c8659027f6f2276c3fe9d8e064a3
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>
Add docstrings to functions
(Even though these are the sort of functions that in minibuffer.el
have no docstrings. :P)
---
orderless.el | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/orderless.el b/orderless.el
index f082ba6035..c2c6237fb0 100644
--- a/orderless.el
+++ b/orderless.el
@@ -36,7 +36,7 @@
;;
;; By default the space key is bound to `minibuffer-complete-word' in
;; `minibuffer-local-map', which isn't useful with this completion
-;; method. So, if you use it, you should also unbind SPC.
+;; method. So, if you use it, you should also unbind SPC.
;;
;; So to test this completion you can use the following configuration:
;;
@@ -97,7 +97,8 @@ component regexps."
orderless-match-face-2
orderless-match-face-3]))
(defun orderless--highlight-match (regexp string face)
- ;; only call this when the match has already been checked!
+ "Highlight REGEXP match in STRING with the face numbered FACE.
+Warning: only call this function when you know REGEXP matches STRING!"
(string-match regexp string)
(font-lock-prepend-text-property
(match-beginning 0)
@@ -106,6 +107,9 @@ component regexps."
string)))
(defun orderless-all-completions (string table pred _point)
+ "Split STRING into components and find entries TABLE matching all.
+The predicate PRED is used to constrain the entries in TABLE.
+This function is part of the `orderless' completion style."
(save-match-data
(let* ((limit (car (completion-boundaries string table pred "")))
(prefix (substring string 0 limit))
@@ -132,6 +136,13 @@ component regexps."
(invalid-regexp nil)))))
(defun orderless-try-completion (string table pred point &optional _metadata)
+ "Complete STRING to unique matching entry in TABLE.
+This uses `orderless-all-completions' to find matches for STRING
+in TABLE among entries satisfying PRED (that function ignores
+POINT). If there is only one match, it completes to that match.
+If there are no matches, it returns nil. In any other case it
+\"completes\" STRING to itself. This function is part of the
+`orderless' completion style."
(let* ((limit (car (completion-boundaries string table pred "")))
(prefix (substring string 0 limit))
(all (orderless-all-completions string table pred point)))
- [elpa] externals/orderless c23a9a40be 050/204: Typo in README, (continued)
- [elpa] externals/orderless c23a9a40be 050/204: Typo in README, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 40d46ba925 080/204: Fix typo, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless a3471e47aa 083/204: Explain company integration (+ misc formatting improvements), ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 7e57a5458c 085/204: Allow dispatcher to modify component without handling it, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 7a547b5722 093/204: Drew says "progressive completion", ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 99e90bf139 103/204: Declare orderless-old-component-separator obsolete too, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 42bca066b9 108/204: Split dispatchers into their own variable, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 81248a8dbf 109/204: Merge branch 'dispatcher', ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 0efa87672d 011/204: Fix bug on no matches, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless acc2645cf3 030/204: Even better match faces (kindly contributed by Protesilaos), ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 6ada0ad21c 035/204: Add docstrings to functions,
ELPA Syncer <=
- [elpa] externals/orderless a371c26c69 003/204: Stronger wording for warning, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless d576dc9fac 028/204: Add reminder that match faces only are used if orderless "wins", ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 6aabc83f02 022/204: Remove warning and stuff about SPC, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 1ad6bd254b 021/204: Only copy and highlight once the candidate is known to match, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless f2af44bf2e 057/204: Mention Icicles's progressive matching, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 1631eb1733 073/204: Fix autoload for ivy, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 862eed345c 075/204: Add more orderless initialism styles, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless e3644defcd 088/204: Add orderless-pattern-compiler variable for maximum flexibility, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 436ef98b16 089/204: Add optional argument for dispatches: total number of components, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless ed37c22902 097/204: Prefer descriptive argument over "mystery t's", ELPA Syncer, 2022/01/11