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

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

[elpa] master 67cd682 06/54: Fix #126 again.


From: Oleh Krehel
Subject: [elpa] master 67cd682 06/54: Fix #126 again.
Date: Tue, 29 Sep 2015 14:09:48 +0000

branch: master
commit 67cd682ef6f099ac9320f3da34ca80cba74571ee
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    Fix #126 again.
    
    After #126 has been solved, the regexp has been changed to
    
      "\\`[`']?\\(.*\\)'?\\'"
    
    where the trailing ' is optional ("'?").  However, the preceeding
    "\\(.*\\)" group will already capture the trailing ' because .* is
    greedy.  Now I've replaced it with the non-greedy .*? which makes it
    work again.
---
 counsel.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/counsel.el b/counsel.el
index f667916..bcd99b7 100644
--- a/counsel.el
+++ b/counsel.el
@@ -138,7 +138,7 @@
   "Return current symbol at point as a string."
   (let ((s (thing-at-point 'symbol)))
     (and (stringp s)
-         (if (string-match "\\`[`']?\\(.*\\)'?\\'" s)
+         (if (string-match "\\`[`']?\\(.*?\\)'?\\'" s)
              (match-string 1 s)
            s))))
 



reply via email to

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