[Top][All Lists]

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

[elpa] master e65d014: Use `read' to circumvent bug#24542

From: Michael Heerdegen
Subject: [elpa] master e65d014: Use `read' to circumvent bug#24542
Date: Wed, 25 Jan 2017 03:42:42 +0000 (UTC)

branch: master
commit e65d014b67ae51c8b185e812307b081601f31882
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>

    Use `read' to circumvent bug#24542
    Use `read' to jump over symbols starting with an "@" character.  This
    should fix the issues caused by bug#24542 completely instead of
    handling only special cases.
    Add some documentation for `el-search--end-of-sexp'.
 packages/el-search/el-search.el |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index e9ac389..019c935 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -592,8 +592,13 @@ matches the (only) argument (that should be a string)."
 (defun el-search--end-of-sexp ()
-  ;; Assumes point is at sexp beginning
-  (or (scan-sexps (point) 1) (point-max)))
+  "Return the value of point at the end of this sexp.
+Assumes point is at a sexp beginning."
+  (if (eql (char-after) ?@) ;bug#24542
+      (save-excursion
+        (ignore (read (current-buffer)))
+        (point))
+    (or (scan-sexps (point) 1) (point-max))))
 (defun el-search--skip-expression (expression &optional read)
   ;; Move forward at least one character.  Don't move into a string or
@@ -608,8 +613,6 @@ matches the (only) argument (that should be a string)."
   ;; point instead.
   (when read (setq expression (save-excursion (read (current-buffer)))))
-   ((and (symbolp expression)) (string-match-p "address@hidden'" (symbol-name 
expression)) ;bug#24542
-    (forward-char (length (symbol-name expression))))
    ((or (null expression)
         (equal [] expression)
         (not (or (listp expression) (vectorp expression))))

reply via email to

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