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

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

[elpa] master 1d184b0 05/17: Regexp-quote strings of avy-goto-char* func


From: Oleh Krehel
Subject: [elpa] master 1d184b0 05/17: Regexp-quote strings of avy-goto-char* functions.
Date: Fri, 08 May 2015 13:42:07 +0000

branch: master
commit 1d184b0e2ac3433d0e5ba3c8eefef4ca56918dd1
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    Regexp-quote strings of avy-goto-char* functions.
    
    Before this commit, avy-goto-char with char ^ would inf-loop because the
    resulting string "^" is treated as a regular expressions.  However, with
    the avy-goto-char* function, the char should be treated literally.  For
    example, in Clojure ^:foo is treated as metadata annotation and thus ^
    is a likely jump target.
---
 avy-jump.el |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/avy-jump.el b/avy-jump.el
index 89a443a..f596363 100644
--- a/avy-jump.el
+++ b/avy-jump.el
@@ -236,7 +236,7 @@ The window scope is determined by `avy-all-windows'.
 When ARG is non-nil, flip the window scope."
   (interactive "P")
   (avy--generic-jump
-   (string (read-char "char: ")) arg))
+   (regexp-quote (string (read-char "char: "))) arg))
 
 ;;;###autoload
 (defun avy-goto-char-2 (&optional arg)
@@ -244,9 +244,9 @@ When ARG is non-nil, flip the window scope."
 When ARG is non-nil, flip the window scope."
   (interactive "P")
   (avy--generic-jump
-   (string
-    (read-char "char 1: ")
-    (read-char "char 2: "))
+   (regexp-quote (string
+                 (read-char "char 1: ")
+                 (read-char "char 2: ")))
    arg))
 
 ;;;###autoload



reply via email to

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