[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/orderless 818af9e6f0 167/204: Remove pattern compiler v
From: |
ELPA Syncer |
Subject: |
[elpa] externals/orderless 818af9e6f0 167/204: Remove pattern compiler variable |
Date: |
Tue, 11 Jan 2022 12:58:27 -0500 (EST) |
branch: externals/orderless
commit 818af9e6f0c9ce89dbd45e01a17a9b8f9c74ef7f
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Remove pattern compiler variable
It is unlikely that a user wants to customize this variable. If the pattern
compiler is to be replaced there is still the advice mechanism.
---
README.org | 15 ++++++---------
orderless.el | 31 ++++++-------------------------
orderless.texi | 29 +++++++++++------------------
3 files changed, 23 insertions(+), 52 deletions(-)
diff --git a/README.org b/README.org
index e0680a9dc2..fb55289e9b 100644
--- a/README.org
+++ b/README.org
@@ -237,15 +237,12 @@ completion is the one that ends up being used, of course.
** Pattern compiler
-The default mechanism for turning an input string into a list of
-regexps to match against, configured using =orderless-matching-styles=,
-is probably flexible enough for the vast majority of users. But if you
-want to completely change the mechanism, customize the
-=orderless-pattern-compiler=. It's value should be a function from
-string to lists of regexps. You might find it convenient to use
-=orderless-default-pattern-compiler= as a subroutine in your own pattern
-compiler, it conveniently accepts optional arguments that specify
-lists to use instead of =orderless-matching-styles=.
+The default mechanism for turning an input string into a list of regexps to
+match against, configured using =orderless-matching-styles=, is probably
+flexible enough for the vast majority of users. The patterns are compiled by
the
+=orderless-pattern-compiler=. Under special circumstances it may be useful to
+implement a custom pattern compiler by advising the
+=orderless-pattern-compiler=.
** Interactively changing the configuration
diff --git a/orderless.el b/orderless.el
index ce34d497c4..0d75a7e9cd 100644
--- a/orderless.el
+++ b/orderless.el
@@ -152,24 +152,9 @@ match as literals. As another example, a style dispatcher
could
arrange for a component starting with `?' to match the rest of
the component in the `orderless-flex' style. For more
information on how this variable is used, see
-`orderless-default-pattern-compiler'."
+`orderless-pattern-compiler'."
:type 'hook)
-(defcustom orderless-pattern-compiler #'orderless-default-pattern-compiler
- "The `orderless' pattern compiler.
-This should be a function that takes an input pattern and returns
-a list of regexps that must all match a candidate in order for
-the candidate to be considered a completion of the pattern.
-
-The default pattern compiler is probably flexible enough for most
-users. See `orderless-default-pattern-compiler' for details.
-
-The documentation for `orderless-matching-styles' is written
-assuming the default pattern compiler is used, if you change the
-pattern compiler it can, of course, do anything and need not
-consult this variable at all."
- :type 'function)
-
(defcustom orderless-smart-case t
"Whether to use smart case.
If this variable is t, then case-sensitivity is decided as
@@ -306,7 +291,7 @@ For the user's convenience, if REGEXPS is a string, it is
converted to a list of regexps according to the value of
`orderless-matching-styles'."
(when (stringp regexps)
- (setq regexps (funcall orderless-pattern-compiler regexps)))
+ (setq regexps (orderless-pattern-compiler regexps)))
(cl-loop for original in strings
for string = (copy-sequence original)
collect (orderless--highlight regexps string)))
@@ -362,7 +347,7 @@ DEFAULT as the list of styles."
when result return (cons result string)
finally (return (cons default string))))
-(defun orderless-default-pattern-compiler (pattern &optional styles
dispatchers)
+(defun orderless-pattern-compiler (pattern &optional styles dispatchers)
"Build regexps to match the components of PATTERN.
Split PATTERN on `orderless-component-separator' and compute
matching styles for each component. For each component the style
@@ -376,11 +361,7 @@ dispatchers.
The STYLES default to `orderless-matching-styles', and the
DISPATCHERS default to `orderless-dipatchers'. Since nil gets you
the default, if want to no dispatchers to be run, use '(ignore)
-as the value of DISPATCHERS.
-
-This function is the default for `orderless-pattern-compiler' and
-might come in handy as a subroutine to implement other pattern
-compilers."
+as the value of DISPATCHERS."
(unless styles (setq styles orderless-matching-styles))
(unless dispatchers (setq dispatchers orderless-style-dispatchers))
(cl-loop
@@ -413,7 +394,7 @@ The predicate PRED is used to constrain the entries in
TABLE."
(pcase-let* ((`(,prefix . ,pattern)
(orderless--prefix+pattern string table pred))
(completion-regexp-list
- (funcall orderless-pattern-compiler pattern))
+ (orderless-pattern-compiler pattern))
(completion-ignore-case
(if orderless-smart-case
(cl-loop for regexp in completion-regexp-list
@@ -515,7 +496,7 @@ delegates to `orderless-%s'.")
This function is for integration of orderless with ivy, use it as
a value in `ivy-re-builders-alist'."
(or (mapcar (lambda (x) (cons x t))
- (funcall orderless-pattern-compiler str))
+ (orderless-pattern-compiler str))
""))
(defun orderless-ivy-highlight (str)
diff --git a/orderless.texi b/orderless.texi
index 65beb96867..eb3dc23731 100644
--- a/orderless.texi
+++ b/orderless.texi
@@ -14,7 +14,6 @@
@finalout
@titlepage
@title Orderless
-@author Omar AntolĂn Camarena
@end titlepage
@contents
@@ -55,7 +54,7 @@ Related packages
* Ivy and Helm::
* Prescient::
-* Restricting to current matches in Icicles, Ido and Ivy: Restricting to
current matches in Icicles Ido and Ivy.
+* Restricting to current matches in Icicles, Ido and Ivy: Restricting to
current matches in Icicles Ido and Ivy.
@end detailmenu
@end menu
@@ -131,10 +130,7 @@ define new matching styles. The predefined ones are:
the component is treated as a regexp that must
match somewhere in the candidate.
-If the component is not a valid regexp, it matches literally.
-(Having the component be invalid is actually pretty common while you
-are typing, so be prepared for the results to be a little funny
-before you close a bracket or parentheses, etc.)
+If the component is not a valid regexp, it is ignored.
@item orderless-literal
the component is treated as a literal string
@@ -294,15 +290,12 @@ completion is the one that ends up being used, of course.
@node Pattern compiler
@section Pattern compiler
-The default mechanism for turning an input string into a list of
-regexps to match against, configured using @samp{orderless-matching-styles},
-is probably flexible enough for the vast majority of users. But if you
-want to completely change the mechanism, customize the
-@samp{orderless-pattern-compiler}. It's value should be a function from
-string to lists of regexps. You might find it convenient to use
-@samp{orderless-default-pattern-compiler} as a subroutine in your own pattern
-compiler, it conveniently accepts optional arguments that specify
-lists to use instead of @samp{orderless-matching-styles}.
+The default mechanism for turning an input string into a list of regexps to
+match against, configured using @samp{orderless-matching-styles}, is probably
+flexible enough for the vast majority of users. The patterns are compiled by
the
+@samp{orderless-pattern-compiler}. Under special circumstances it may be
useful to
+implement a custom pattern compiler by advising the
+@samp{orderless-pattern-compiler}.
@node Interactively changing the configuration
@section Interactively changing the configuration
@@ -426,7 +419,7 @@ face with this configuration:
@menu
* Ivy and Helm::
* Prescient::
-* Restricting to current matches in Icicles, Ido and Ivy: Restricting to
current matches in Icicles Ido and Ivy.
+* Restricting to current matches in Icicles, Ido and Ivy: Restricting to
current matches in Icicles Ido and Ivy.
@end menu
@node Ivy and Helm
@@ -435,7 +428,7 @@ face with this configuration:
The well-known and hugely powerful completion frameworks
@uref{https://github.com/abo-abo/swiper, Ivy} and
@uref{https://github.com/emacs-helm/helm, Helm}
also provide for matching space-separated component regexps in any
order. In Ivy, this is done with the @samp{ivy--regex-ignore-order} matcher.
-In Helm, it is the default, called ``multi pattern matching''.
+In Helm, it is the default, called "multi pattern matching".
This package is significantly smaller than either of those because it
solely defines a completion style, meant to be used with any completion UI
supporting completion styles while both of those provide their own
@@ -465,7 +458,7 @@ components in any order and it can be used with either the
@uref{https://github.
or @uref{https://github.com/abo-abo/swiper, Ivy} completion UIs (it does not
offer a completion-style that
could be used with Emacs' default completion UI or with Icomplete).
The components can be matched literally, as regexps, as initialisms or
-in the flex style (called ``fuzzy'' in prescient). In addition to
+in the flex style (called "fuzzy" in prescient). In addition to
matching, @samp{prescient.el} also supports sorting of candidates
(@samp{orderless}
leaves that up to the candidate source and the completion UI).
- [elpa] externals/orderless 3bcfb3f806 131/204: Generate texinfo manual from readme, (continued)
- [elpa] externals/orderless 3bcfb3f806 131/204: Generate texinfo manual from readme, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 487e51ea66 132/204: Merge branch 'master' of https://github.com/oantolin/orderless, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless a22d894d39 142/204: Revert "Update documentation" for #31, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless ea752ba6e3 143/204: Revert "Add matching style and dispatcher per category overrides (fix #31)", ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 8e28b74aab 147/204: Update information about Selectrum, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless ee5e8bda25 149/204: Remove unnecessary :group in defcustom, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 237ee002ac 158/204: Make orderless-regexp match invalid regexps literally, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 9b70ac8df2 161/204: orderless-filter: Remove unnecessary condition-case, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless f6394f19f3 163/204: orderless-default-pattern-compiler: Ignore nil components, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 3440b5aa33 162/204: orderless-regexp: Return "null matcher" if regexp is invalid, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 818af9e6f0 167/204: Remove pattern compiler variable,
ELPA Syncer <=
- [elpa] externals/orderless 9637d7fd59 177/204: Merge pull request #56 from minad/readme-fix, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 2646dad28c 182/204: Update manual to mention Vertico, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless f7be0fb8ee 180/204: Make strict initialism independent of syntax tables (fix #60), ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 1e84120a28 184/204: Merge pull request #70 from minad/group, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 268e56d436 186/204: Fix orderless-escapable-split-on-space, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 665ade9984 187/204: Merge pull request #76 from minad/fix-split, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 1a7011ac9c 189/204: Merge pull request #77 from minad/fix-split2, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 8cea82b6d3 194/204: Merge pull request #97 from minad/optimize-try, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless c615334c79 196/204: Simplify, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 1e59cf2b9c 195/204: Fix orderless-try-completion for hash tables and alists, ELPA Syncer, 2022/01/11