branch: externals/ivy-hydra
commit 7c0f16db7028d4d4ea52bc029cd6cb91a36ccc36
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
swiper.el (swiper--re-builder): Genaralize search-default-mode
Fixes #2465
---
swiper.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/swiper.el b/swiper.el
index 7924c21..00e6b82 100644
--- a/swiper.el
+++ b/swiper.el
@@ -764,16 +764,16 @@ line numbers. For the buffer, use `ivy--regex' instead."
(setq ivy--subexps 1)))
(t
(format "^ %s" re)))))
- ((eq (bound-and-true-p search-default-mode)
'char-fold-to-regexp)
+ ((fboundp (bound-and-true-p search-default-mode))
(if (string-match "\\`\\\\_<\\(.+\\)\\\\_>\\'" str)
(concat
"\\_<"
- (char-fold-to-regexp (match-string 1 str))
+ (funcall search-default-mode (match-string 1 str))
"\\_>")
(let ((subs (ivy--split str)))
(setq ivy--subexps (length subs))
(mapconcat
- (lambda (s) (format "\\(%s\\)" (char-fold-to-regexp s)))
+ (lambda (s) (format "\\(%s\\)" (funcall
search-default-mode s)))
subs
".*?"))))
(t