[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/orderless 87ab7e47e3 168/204: Merge pull request #46 fr
From: |
ELPA Syncer |
Subject: |
[elpa] externals/orderless 87ab7e47e3 168/204: Merge pull request #46 from minad/remove-pattern-compiler-variable |
Date: |
Tue, 11 Jan 2022 12:58:28 -0500 (EST) |
branch: externals/orderless
commit 87ab7e47e343285f7afd42779c78551332b8fd84
Merge: 44935d8962 818af9e6f0
Author: Omar Antolín Camarena <omar.antolin@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #46 from minad/remove-pattern-compiler-variable
Remove pattern compiler variable
---
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 830976770b 102/204: Put integration before related packages in README, (continued)
- [elpa] externals/orderless 830976770b 102/204: Put integration before related packages in README, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 68e592055c 113/204: The transient variables should not be customizable, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 5b292ac136 118/204: Document custom splitter option, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 1d62307cce 125/204: Add badge., ELPA Syncer, 2022/01/11
- [elpa] externals/orderless cbc0109eac 136/204: Merge pull request #28 from b3n/patch-1, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless d1c0cbf87b 137/204: Add matching style and dispatcher per category overrides (fix #31), ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 5dcf4a6f2b 135/204: Corrected broken link, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 701b6a07c8 156/204: orderless-try-completions: Remove _metadata argument, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless a609004d5f 159/204: Document that orderless-regexp matches invalid regexps literally, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless d6eb575714 165/204: Merge pull request #44 from minad/invalid-regexp, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 87ab7e47e3 168/204: Merge pull request #46 from minad/remove-pattern-compiler-variable,
ELPA Syncer <=
- [elpa] externals/orderless d2891b807b 174/204: orderless+initialism example requires Marginalia (see #54), ELPA Syncer, 2022/01/11
- [elpa] externals/orderless e4c38efcd6 176/204: README: Add variable category to orderless+initialism sample, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 871eb1d0f0 178/204: Use add-face-text-property, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless df4f29a4f4 183/204: Use minibuffer customization group, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 62f71c34ba 191/204: Extend prefix optimization to anchored quoted regexps (fix #81), ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 75d3398056 192/204: Have orderless-try-completion return t for exact match (fix #95), ELPA Syncer, 2022/01/11
- [elpa] externals/orderless c8731aacfa 197/204: Merge pull request #98 from minad/fix-try, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless f22789f358 202/204: Merge pull request #94 from minad/strict-initialism, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 855255eb01 198/204: Mention Corfu and consult-completion-in-region (fix #99), ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 269d7388ab 034/204: Merge pull request #6 from raxod502/patch-1, ELPA Syncer, 2022/01/11