[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/bug-42149-funny-pcm-completion-scores 04fdac8 5/6: Add docstring
From: |
Jo�o T�vora |
Subject: |
scratch/bug-42149-funny-pcm-completion-scores 04fdac8 5/6: Add docstring to completion-pcm--hilit-commonality |
Date: |
Mon, 28 Dec 2020 04:29:27 -0500 (EST) |
branch: scratch/bug-42149-funny-pcm-completion-scores
commit 04fdac879430ed293da5311c967eabd5c73752f8
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Add docstring to completion-pcm--hilit-commonality
bug#42149
* lisp/minibuffer.el (completion-pcm--hilit-commonality): Add
docstring
---
lisp/minibuffer.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index df4ec67..d0ff0d4 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -3244,6 +3244,13 @@ than the latter (which has two \"holes\" and three
one-letter-long matches).")
(defun completion-pcm--hilit-commonality (pattern completions)
+ "Tell where and how well PATTERN matches the strings in COMPLETIONS.
+PATTERN is a list of symbols and strings (see
+`completion-pcm--merge-completions'). It is assumed beforehand
+that PATERN matches every string in COMPLETIONS. This function's
+job is to propertize these strings with faces
+`completions-common-part', `completions-first-difference' and
+with a numeric property `completion-score'."
(when completions
(let* ((re (completion-pcm--pattern->regex pattern 'group))
(point-idx (completion-pcm--pattern-point-idx pattern))
- branch scratch/bug-42149-funny-pcm-completion-scores created (now 00ff781), Jo�o T�vora, 2020/12/28
- scratch/bug-42149-funny-pcm-completion-scores 8465bf1 2/6: Make a completion test robust to custom completion styles, Jo�o T�vora, 2020/12/28
- scratch/bug-42149-funny-pcm-completion-scores b06aadf 1/6: Add tests for bug#42149, Jo�o T�vora, 2020/12/28
- scratch/bug-42149-funny-pcm-completion-scores 1deade1 3/6: Robustify a helper function for test/lisp/minibuffer-tests.el, Jo�o T�vora, 2020/12/28
- scratch/bug-42149-funny-pcm-completion-scores ec02ae5 4/6: Robustify completion match scoring for incomplete/implicit patterns, Jo�o T�vora, 2020/12/28
- scratch/bug-42149-funny-pcm-completion-scores 04fdac8 5/6: Add docstring to completion-pcm--hilit-commonality,
Jo�o T�vora <=
- scratch/bug-42149-funny-pcm-completion-scores 00ff781 6/6: Slightly simplify completion-pcm--hilit-commonality, Jo�o T�vora, 2020/12/28