[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 58bc417 014/110: Escape regex metacharacters for standard
From: |
Oleh Krehel |
Subject: |
[elpa] master 58bc417 014/110: Escape regex metacharacters for standard isearch |
Date: |
Sat, 11 May 2019 10:15:34 -0400 (EDT) |
branch: master
commit 58bc417c55f7b5d2fa14a8e55b899fa1655ca9fc
Author: Mark Triggs <address@hidden>
Commit: Mark Triggs <address@hidden>
Escape regex metacharacters for standard isearch
Doing an isearch for '[' and then invoking avy-isearch would trigger an
error like:
Invalid regexp: "Unmatched [ or [^"
If we are not doing a regex-based search, escape the search string to
avoid these kind of issues.
---
avy.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/avy.el b/avy.el
index 1e5ee1a..94e899c 100644
--- a/avy.el
+++ b/avy.el
@@ -982,7 +982,9 @@ The window scope is determined by `avy-all-windows' (ARG
negates it)."
(avy-with avy-isearch
(let ((avy-background nil))
(avy--process
- (avy--regex-candidates isearch-string)
+ (avy--regex-candidates (if isearch-regexp
+ isearch-string
+ (regexp-quote isearch-string)))
(avy--style-fn avy-style))
(isearch-done))))
- [elpa] master e460d7e 025/110: avy.el (flyspell-correct-word-before-point): Declare, (continued)
- [elpa] master e460d7e 025/110: avy.el (flyspell-correct-word-before-point): Declare, Oleh Krehel, 2019/05/11
- [elpa] master 05a5003 022/110: avy.el: Fix linum-related compile warnings, Oleh Krehel, 2019/05/11
- [elpa] master 430d750 019/110: avy.el (avy--line-cands): Split away from avy--line, Oleh Krehel, 2019/05/11
- [elpa] master 0f5e99b 030/110: avy.el: Use next-char-property-change, not next-overlay-change, Oleh Krehel, 2019/05/11
- [elpa] master 33af738 017/110: avy.el (avy-goto-word-1-above): Add, Oleh Krehel, 2019/05/11
- [elpa] master 105efc8 037/110: avy.el (avy-action-copy): Copy line for avy-goto-line, Oleh Krehel, 2019/05/11
- [elpa] master 4e4c488 020/110: Add avy-linum-mode, Oleh Krehel, 2019/05/11
- [elpa] master d644be1 016/110: avy.el (avy-goto-char-2-above): Simplify, Oleh Krehel, 2019/05/11
- [elpa] master 4dcf0a9 018/110: avy.el (avy-goto-char-2): Translate "RET" to "C-j", Oleh Krehel, 2019/05/11
- [elpa] master ba950a0 015/110: avy.el (avy-goto-char-2-above): Add, Oleh Krehel, 2019/05/11
- [elpa] master 58bc417 014/110: Escape regex metacharacters for standard isearch,
Oleh Krehel <=
- [elpa] master 2e3c2f7 013/110: Add new command `avy-move-region', Oleh Krehel, 2019/05/11
- [elpa] master 85a384a 012/110: Add char at window start for avy-goto-subword-0, Oleh Krehel, 2019/05/11
- [elpa] master a80f95c 007/110: Add "X" dispatch to kill a word without moving there, Oleh Krehel, 2019/05/11
- [elpa] master 9e61f78 006/110: avy.el: Improve defcustom :type, Oleh Krehel, 2019/05/11
- [elpa] master 5ba3602 009/110: Assign avy-action-ispell to "i", Oleh Krehel, 2019/05/11
- [elpa] master 53706d2 011/110: avy.el (avy-all-windows-alt): Change the default to nil, Oleh Krehel, 2019/05/11
- [elpa] master 4c072be 010/110: README.md (avy-goto-char-timer): Add entry, Oleh Krehel, 2019/05/11
- [elpa] master c0db364 008/110: Add avy-action-ispell to avy.el, Oleh Krehel, 2019/05/11
- [elpa] master 3b75d95 005/110: Make "C-g" and "ESC" fail silently when reading char, Oleh Krehel, 2019/05/11
- [elpa] master 5f76c9d 004/110: avy.el (avy-goto-word-0-regexp): New defcustom, Oleh Krehel, 2019/05/11