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

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

[elpa] externals/el-search 4b934f1 238/332: * el-search/el-search.el: Sk


From: Stefan Monnier
Subject: [elpa] externals/el-search 4b934f1 238/332: * el-search/el-search.el: Skip over #N read syntaxes
Date: Tue, 1 Dec 2020 15:48:53 -0500 (EST)

branch: externals/el-search
commit 4b934f1f3087d5deb2be6f0a3595a13934882fd1
Author: Michael Heerdegen <michael_heerdegen@web.de>
Commit: Michael Heerdegen <michael_heerdegen@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.
---
 el-search.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/el-search.el b/el-search.el
index 3ca3147..0f2c77b 100644
--- a/el-search.el
+++ b/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

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