branch: elpa/anzu
commit 5684b4b601341f960f6de404259cce0bc61ffc11
Author: Syohei YOSHIDA <[email protected]>
Commit: Syohei YOSHIDA <[email protected]>

    Check replaced regexp is valid
---
 anzu.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/anzu.el b/anzu.el
index 010d96332c..5c39c18c48 100644
--- a/anzu.el
+++ b/anzu.el
@@ -511,6 +511,8 @@
                (query-replace-descr (cdar anzu--query-defaults)) use-regexp))
       (add-to-history query-replace-from-history-variable from nil t)
       (when use-regexp
+        (unless (anzu--validate-regexp from)
+          (error "'%s' is invalid regexp." from))
         (anzu--query-validate-from-regexp from))
       from)))
 

Reply via email to