emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ivy-hydra c5e162a 013/395: swiper.el (swiper-thing-at-p


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra c5e162a 013/395: swiper.el (swiper-thing-at-point): Use regexp-quote
Date: Thu, 25 Feb 2021 08:31:20 -0500 (EST)

branch: externals/ivy-hydra
commit c5e162af215b97d6ce92ca894f60d52d9551efb3
Author: Hong Xu <hong@topbug.net>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    swiper.el (swiper-thing-at-point): Use regexp-quote
    
    This helps when thing-at-point is symbols like 1+, c++-mode, etc.
    
    Fixes #2292
---
 swiper.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/swiper.el b/swiper.el
index d8c6f54..fde1bf0 100644
--- a/swiper.el
+++ b/swiper.el
@@ -565,7 +565,7 @@ When non-nil, INITIAL-INPUT is the initial search pattern."
   (let ((thing (ivy-thing-at-point)))
     (when (use-region-p)
       (deactivate-mark))
-    (swiper thing)))
+    (swiper (regexp-quote thing))))
 
 ;;;###autoload
 (defun swiper-all-thing-at-point ()
@@ -574,7 +574,7 @@ When non-nil, INITIAL-INPUT is the initial search pattern."
   (let ((thing (ivy-thing-at-point)))
     (when (use-region-p)
       (deactivate-mark))
-    (swiper-all thing)))
+    (swiper-all (regexp-quote thing))))
 
 (defun swiper--extract-matches (regex cands)
   "Extract captured REGEX groups from CANDS."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]