diff options
| author | Omar Antolín <omar.antolin@gmail.com> | 2021-03-23 09:43:23 -0600 |
|---|---|---|
| committer | Omar Antolín <omar.antolin@gmail.com> | 2021-03-23 09:43:23 -0600 |
| commit | 237ee002acb3d1211d621a38eed42a4d200e0cef (patch) | |
| tree | e00d60a93ac8bb50279d09a1dc1207992720f71b /orderless.el | |
| parent | 9d5b95f40275dc47a57e9d4ee9b9994ee3a4b426 (diff) | |
Make orderless-regexp match invalid regexps literally
Diffstat (limited to 'orderless.el')
| -rw-r--r-- | orderless.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/orderless.el b/orderless.el index f2b9d70..9b2b318 100644 --- a/orderless.el +++ b/orderless.el @@ -186,9 +186,11 @@ is determined by the values of `completion-ignore-case', ;;; Matching styles -(defalias 'orderless-regexp #'identity - "Match a component as a regexp. -This is simply the identity function.") +(defun orderless-regexp (component) + "Match a component as a regexp." + (condition-case nil + (progn (string-match-p component "") component) + (invalid-regexp (regexp-quote component)))) (defalias 'orderless-literal #'regexp-quote "Match a component as a literal string. |
