emacs-diffs
[Top][All Lists]
Advanced

[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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]