emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/orderless bf91e1d8a2 095/204: Name sections of code


From: ELPA Syncer
Subject: [elpa] externals/orderless bf91e1d8a2 095/204: Name sections of code
Date: Tue, 11 Jan 2022 12:58:20 -0500 (EST)

branch: externals/orderless
commit bf91e1d8a2214febbdaf3b539669aadcd6c30575
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>

    Name sections of code
---
 orderless.el | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/orderless.el b/orderless.el
index 504b422dfd..2223632a17 100644
--- a/orderless.el
+++ b/orderless.el
@@ -190,6 +190,8 @@ This is simply the identity function.")
   "Match a component as a literal string.
 This is simply `regexp-quote'.")
 
+;;; Matching styles
+
 (defun orderless--separated-by (sep rxs &optional before after)
   "Return a regexp to match the rx-regexps RXS with SEP in between.
 If BEFORE is specified, add it to the beginning of the rx
@@ -264,6 +266,8 @@ at a word boundary in the candidate.  This is similar to the
    (cl-loop for prefix in (split-string component "\\>" t)
             collect `(seq word-boundary ,prefix))))
 
+;;; Highlighting matches
+
 (defun orderless--highlight (regexps string)
   "Propertize STRING to highlight a match of each of the REGEXPS.
 Warning: only use this if you know all REGEXPs match!"
@@ -291,6 +295,8 @@ converted to a list of regexps according to the value of
              for string = (copy-sequence original)
              collect (orderless--highlight regexps string)))
 
+;;; Compiling patterns to lists of regexps
+
 (defun orderless-default-pattern-compiler (pattern)
   "Build regexps to match the components of PATTERN.
 Split PATTERN on `orderless-component-separator' and consult
@@ -322,6 +328,8 @@ This is the default value of `orderless-pattern-compiler'."
           ,@(cl-loop for style in styles
                      collect `(regexp ,(funcall style component)))))))))
 
+;;; Completion style implementation
+
 (defun orderless--prefix+pattern (string table pred)
   "Split STRING into prefix and pattern according to TABLE.
 The predicate PRED is used to constrain the entries in TABLE."
@@ -380,6 +388,8 @@ This function is part of the `orderless' completion style."
                orderless-try-completion orderless-all-completions
                "Completion of multiple components, in any order."))
 
+;;; Temporary separator change (does anyone use this?)
+
 (defvar orderless-old-component-separator nil
   "Stores the old value of `orderless-component-separator'.")
 
@@ -400,7 +410,7 @@ This function is part of the `orderless' completion style."
   (setq orderless-component-separator separator)
   (add-to-list 'minibuffer-exit-hook #'orderless--restore-component-separator))
 
-;;; ivy integration
+;;; Ivy integration
 
 (defvar ivy-regex)
 (defvar ivy-highlight-functions-alist)



reply via email to

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