summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2024-03-12 20:06:51 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2024-03-12 20:14:04 +0100
commitdc7a781acf2e58ac7d20d1b522be0cde5213e057 (patch)
tree9f912e0d19eb877cc81f3887a97dcb0e75ccaa3d
parentd814ff6dbcb91c2540dc3b93908f0713d19d55f4 (diff)
orderless-literal: Go back to regexp-quote
Otherwise the duplicates created by the orderless-regexp and orderless-literal styles are not deleted.
-rw-r--r--orderless.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/orderless.el b/orderless.el
index 4bab77b..98748a6 100644
--- a/orderless.el
+++ b/orderless.el
@@ -221,7 +221,11 @@ is determined by the values of `completion-ignore-case',
(defun orderless-literal (component)
"Match COMPONENT as a literal string."
- `(literal ,component))
+ ;; Do not use (literal component) here, such that `delete-dups' in
+ ;; `orderless--compile-component' has a chance to delete duplicates for
+ ;; literal input. The default configuration of `orderless-matching-styles'
+ ;; with `orderless-regexp' and `orderless-literal' leads to duplicates.
+ (regexp-quote component))
(defun orderless-literal-prefix (component)
"Match COMPONENT as a literal prefix string."