[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/orderless ea752ba6e3 143/204: Revert "Add matching styl
From: |
ELPA Syncer |
Subject: |
[elpa] externals/orderless ea752ba6e3 143/204: Revert "Add matching style and dispatcher per category overrides (fix #31)" |
Date: |
Tue, 11 Jan 2022 12:58:25 -0500 (EST) |
branch: externals/orderless
commit ea752ba6e3ddf0490f7d3b8ec0f27e08344e0758
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>
Revert "Add matching style and dispatcher per category overrides (fix #31)"
This reverts commit d1c0cbf87ba7d927ec64c161ec3aac65b9643b61.
---
README.org | 25 -------------------------
orderless.el | 54 +++++++++++-------------------------------------------
orderless.texi | 24 ------------------------
3 files changed, 11 insertions(+), 92 deletions(-)
diff --git a/README.org b/README.org
index 847b041b77..f74c6663cd 100644
--- a/README.org
+++ b/README.org
@@ -157,16 +157,6 @@ The variable =orderless-matching-styles= can be set to a
list of the
desired matching styles to use. By default it enables the regexp and
initialism styles.
-If you want to use certain matching styles only for completion of
-certain categories, you can add an entry to the built-in variable
-=completion-category-overrides=. For example, to use =orderless-flex= to
-complete buffer names, you could use:
-
-#+begin_src emacs-lisp
- (add-to-list 'completion-category-overrides
- '(buffer (orderless-matching-styles orderless-flex)))
-#+end_src
-
*** Style dispatchers
For more fine-grained control on which matching styles to use for
@@ -215,21 +205,6 @@ complete buffer names, you could use:
without-if-bang))
#+end_src
-As with matching styles, you can set which style dispatchers to use
-for specific completion catgories using the
-=completion-category-overrides= variable. For example, if you wanted to
-match buffer using the =orderless-flex= matching style except for
-components starting with =!=, which you want to treat as excluded terms,
-you could use the following configuration (which relies on the above
-=without-if-bang= dispatcher):
-
-#+begin_src emacs-lisp
- (add-to-list 'completion-category-overrides
- '(buffer (orderless-matching-styles orderless-flex)
- (orderless-style-dispatchers without-if-bang)))
-#+end_src
-
-
** Component separator regexp
The pattern components are space-separated by default: this is
diff --git a/orderless.el b/orderless.el
index b92e6dd5d4..d4fe98a1e1 100644
--- a/orderless.el
+++ b/orderless.el
@@ -415,54 +415,22 @@ DISPATCHERS decline to handle the component, then the
list of
matching STYLES is used. See `orderless-dispatch' for details on
dispatchers.
-If the variable `orderless-transient-component-separator' is
-non-nil, it is used in place of `orderless-component-separator'.
+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.
-When STYLES is nil, it defaults to a list computed as follows:
-
-- if the value of `orderless-transient-matching-styles' is
- non-nil, this value is used;
-
-- next, the category of the current minibuffer completion session
- is looked up in `completion-category-overrides' and if the
- alist associated to it has an `orderless-matching-styles' key,
- the corresponding value is used;
-
-- otherwise, STYLES defaults to the value of the variable
- `orderless-matching-styles'.
-
-The analogous process is used if DISPATCHERS is nil. Since nil
-gets you this default, if want to no dispatchers to be run, use
-'(ignore) as the value of DISPATCHERS.
+The `orderless-transient-*' variables, when non-nil, override the
+corresponding value among `orderless-component-separator', STYLES
+and DISPATCHERS.
This function is the default for `orderless-pattern-compiler' and
might come in handy as a subroutine to implement other pattern
compilers."
-
- ;; figure out defaults for styles and dispatchers
- (let ((overrides
- (unless (or (not minibuffer-completion-table)
- (and (or styles orderless-transient-matching-styles)
- (or dispatchers
orderless-transient-style-dispatchers)))
- ;; we are in minibuffer completion and at least one out of
- ;; styles and dispachers might be overridden in
- ;; completion-category-overrides
- (let* ((metadata (completion-metadata
- (buffer-substring-no-properties
- (field-beginning) (point))
- minibuffer-completion-table
- minibuffer-completion-predicate))
- (category (completion-metadata-get metadata 'category)))
- (cdr (assq category completion-category-overrides))))))
- (setq styles (or styles
- orderless-transient-matching-styles
- (cdr (assq 'orderless-matching-styles overrides))
- orderless-matching-styles))
- (setq dispatchers (or dispatchers
- orderless-transient-style-dispatchers
- (cdr (assq 'orderless-style-dispatchers overrides))
- orderless-style-dispatchers)))
-
+ (unless styles (setq styles orderless-matching-styles))
+ (setq styles (or orderless-transient-matching-styles styles))
+ (unless dispatchers (setq dispatchers orderless-style-dispatchers))
+ (setq dispatchers (or orderless-transient-style-dispatchers dispatchers))
(cl-loop
with splitter = (or orderless-transient-component-separator
orderless-component-separator)
diff --git a/orderless.texi b/orderless.texi
index 0aa29c6b02..d5361c7ac3 100644
--- a/orderless.texi
+++ b/orderless.texi
@@ -197,16 +197,6 @@ The variable @samp{orderless-matching-styles} can be set
to a list of the
desired matching styles to use. By default it enables the regexp and
initialism styles.
-If you want to use certain matching styles only for completion of
-certain categories, you can add an entry to the built-in variable
-@samp{completion-category-overrides}. For example, to use
@samp{orderless-flex} to
-complete buffer names, you could use:
-
-@lisp
-(add-to-list 'completion-category-overrides
- '(buffer (orderless-matching-styles orderless-flex)))
-@end lisp
-
@menu
* Style dispatchers::
@end menu
@@ -266,20 +256,6 @@ You can achieve this with the following configuration:
without-if-bang))
@end lisp
-As with matching styles, you can set which style dispatchers to use
-for specific completion catgories using the
-@samp{completion-category-overrides} variable. For example, if you wanted to
-match buffer using the @samp{orderless-flex} matching style except for
-components starting with @samp{!}, which you want to treat as excluded terms,
-you could use the following configuration (which relies on the above
-@samp{without-if-bang} dispatcher):
-
-@lisp
-(add-to-list 'completion-category-overrides
- '(buffer (orderless-matching-styles orderless-flex)
- (orderless-style-dispatchers without-if-bang)))
-@end lisp
-
@node Component separator regexp
@section Component separator regexp
- [elpa] externals/orderless 21e9f87579 116/204: Typo: escapeable --> escapable, (continued)
- [elpa] externals/orderless 21e9f87579 116/204: Typo: escapeable --> escapable, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 2f2c757a33 117/204: Correct error about orderless-transient-style-dispatchers in README, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 1f985d0e07 119/204: Remove obsolete temporary separator change command and variables, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless c6432b086f 121/204: Bump version number for new smart case feature, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 351d2fbb7d 123/204: Fix typo, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless e316991cfe 127/204: Add negative literals (fix #26), ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 6fec4f0a52 129/204: Remove a duplicated documentation entry, ELPA Syncer, 2022/01/11
- [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 <=
- [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, 2022/01/11
- [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