summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Antolín <omar.antolin@gmail.com>2021-03-23 09:47:54 -0600
committerOmar Antolín <omar.antolin@gmail.com>2021-03-23 09:47:54 -0600
commit150155ce3cdd28a8a94cdf99d769b2350cf07b5c (patch)
tree95c640948494cf21be989b6406537cb3220472aa
parenta609004d5fc3d2755545069187b6362e7a92d017 (diff)
Add literal matching to default styles and document (fix #42)
There is some misguided consensus that any candidate should be able to match itself... :P
-rw-r--r--README.org5
-rw-r--r--orderless.el4
-rw-r--r--orderless.texi7
3 files changed, 6 insertions, 10 deletions
diff --git a/README.org b/README.org
index ef881b1..5d809d3 100644
--- a/README.org
+++ b/README.org
@@ -105,7 +105,6 @@ define new matching styles. The predefined ones are:
are typing, so be prepared for the results to be a little funny
before you close a bracket or parentheses, etc.)
-
- orderless-literal :: the component is treated as a literal string
that must occur in the candidate.
@@ -154,8 +153,8 @@ define new matching styles. The predefined ones are:
This maps =abc= to =a.*b.*c=.
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.
+desired matching styles to use. By default it enables the literal,
+regexp and initialism styles.
*** Style dispatchers
diff --git a/orderless.el b/orderless.el
index 9b2b318..5be0a12 100644
--- a/orderless.el
+++ b/orderless.el
@@ -48,7 +48,7 @@
;; from strings to strings that map a component to a regexp to match
;; against. The variable `orderless-matching-styles' lists the
;; matching styles to be used for components, by default it allows
-;; regexp and initialism matching.
+;; literal, regexp and initialism matching.
;;; Code:
@@ -114,7 +114,7 @@ value means highlighting is skipped."
:type '(choice boolean function))
(defcustom orderless-matching-styles
- '(orderless-regexp orderless-initialism)
+ '(orderless-literal orderless-regexp orderless-initialism)
"List of component matching styles.
If this variable is nil, regexp matching is assumed.
diff --git a/orderless.texi b/orderless.texi
index ce882c3..65beb96 100644
--- a/orderless.texi
+++ b/orderless.texi
@@ -135,10 +135,7 @@ 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.)
-@end table
-
-@table @asis
@item orderless-literal
the component is treated as a literal string
that must occur in the candidate.
@@ -196,8 +193,8 @@ This maps @samp{abc} to @samp{a.*b.*c}.
@end table
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.
+desired matching styles to use. By default it enables the literal,
+regexp and initialism styles.
@menu
* Style dispatchers::