From bbb1e489f5703d9cdb82ec29e38d41fa15308710 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Sat, 19 Sep 2020 16:09:43 -0700 Subject: [PATCH] Placate byte-compiler --- evil-visual-replace.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/evil-visual-replace.el b/evil-visual-replace.el index bb58073..787c339 100644 --- a/evil-visual-replace.el +++ b/evil-visual-replace.el @@ -172,6 +172,8 @@ For non-visual-state replacements, use `replace-regexp'." (if (evil-visual-state-p) end (point-max)) backward)))) +(declare-function pcre-to-elisp "ext:pcre2el") + (defun evil-visual-replace-pcre-replace-regexp (start end type regexp tostr &optional delimited backward) "Replace pcre REGEXP with TOSTR from START to END with CHAR. @@ -210,8 +212,9 @@ For non-visual-state replacements, use `replace-regexp'." (nth 1 args) (nth 2 args) (nth 3 args)))) - (when regexp - (let ((regexp (pcre-to-elisp regexp))) + (when regexp + (require 'pcre2el) + (let ((regexp (pcre-to-elisp regexp))) (if (eq type 'block) (save-excursion (cl-flet ((do-replace