]> code.delx.au - gnu-emacs-elpa/commitdiff
ivy.el (ivy--preselect-index): Don't use regexp-quote
authorOleh Krehel <ohwoeowho@gmail.com>
Mon, 22 Feb 2016 15:32:31 +0000 (16:32 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Mon, 22 Feb 2016 15:32:31 +0000 (16:32 +0100)
I don't remember why `regexp-quote' was needed in the first place.  But
it's useful to have it as a regex at least for `lispy--occur-preselet'
which returns things like "^42" to preselect line 42.

ivy.el

diff --git a/ivy.el b/ivy.el
index 6c3f522bbd9b028fa9b6ccefc79f0032c8e78824..5630f1beba6e667a60219ca97100e7fc5309bb86 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -1592,7 +1592,7 @@ Minibuffer bindings:
          preselect)
         ((cl-position preselect candidates :test #'equal))
         ((stringp preselect)
-         (let ((re (regexp-quote preselect)))
+         (let ((re preselect))
            (cl-position-if
             (lambda (x)
               (string-match re x))