branch: master
commit d04002c8258dfabd66e0bce66514803c3aa5e194
Author: Michael Heerdegen <michael_heerde...@web.de>
Commit: Michael Heerdegen <michael_heerde...@web.de>

    * el-search/el-search.el: Skip over #N read syntaxes
    
    This fixes issues with el-searching being distracted by these
    constructs.
    
    (el-search--ensure-sexp-start): Skip over #N= and #N# read syntaxes.
    Add a sentence to the docstring telling that parts of cyclic sexps may
    be skipped.
---
 packages/el-search/el-search.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index 3ca3147..0f2c77b 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -7,7 +7,7 @@
 ;; Created: 29 Jul 2015
 ;; Keywords: lisp
 ;; Compatibility: GNU Emacs 25
-;; Version: 1.6.8
+;; Version: 1.6.9
 ;; Package-Requires: ((emacs "25") (stream "2.2.4") (cl-print "1.0"))
 
 
@@ -816,7 +816,9 @@ Point should be at a sexp beginning."
   "Move point to the next sexp beginning position.
 Do nothing if already at beginning of a sexp.  `read' the
 expression starting at that position and return it.  Point must
-not be inside a string or comment."
+not be inside a string or comment.
+Subsexps of sexps containing shared parts may be skipped (when
+not `read'able without context)."
   ;; We don't catch end-of-buffer to keep the return value
   ;; non-ambiguous
   (let ((not-done t) res)
@@ -841,6 +843,10 @@ not be inside a string or comment."
            ((or (and (looking-at "'") (funcall looking-at-from-back "#" 1))
                 (and (looking-at "@") (funcall looking-at-from-back "," 1)))
             (forward-char))
+           (;; Skip over #N= and #N# read syntax
+            (or (looking-at "['#`,@]*#[0-9]+=")
+                (looking-at "['#`,@]*#[0-9]+#"))
+            (goto-char (match-end 0)))
            (t (setq stop-here t)))))
       (condition-case nil
           (progn

Reply via email to