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

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

[elpa] externals/relint ffeeb79ee2 2/2: Skip more forms with circular re


From: ELPA Syncer
Subject: [elpa] externals/relint ffeeb79ee2 2/2: Skip more forms with circular references
Date: Sun, 13 Mar 2022 11:57:55 -0400 (EDT)

branch: externals/relint
commit ffeeb79ee2350aa383e72975dea6148916bc5fed
Author: Mattias EngdegÄrd <mattiase@acm.org>
Commit: Mattias EngdegÄrd <mattiase@acm.org>

    Skip more forms with circular references
    
    Prevent read errors when encountering forms like `(#1=a . #1#)`.
---
 relint.el    | 2 +-
 test/5.elisp | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/relint.el b/relint.el
index db63611509..39b8852b51 100644
--- a/relint.el
+++ b/relint.el
@@ -2204,7 +2204,7 @@ Return a list of (FORM . STARTING-POSITION)."
            (setq keep-going nil))
           (invalid-read-syntax
            (cond
-            ((equal (cadr err) "#")
+            ((member (cadr err) '("#" "#="))
              (goto-char pos)
              (forward-sexp 1))
             (t
diff --git a/test/5.elisp b/test/5.elisp
index 931bc1c6a2..42f8bdc876 100644
--- a/test/5.elisp
+++ b/test/5.elisp
@@ -74,6 +74,9 @@
 (defun test-prog2 ()
   (looking-at (prog2 "a" "[VV]" "b" "c")))
 
+;; Don't complain (just skip) the following.
+(defconst my-circle '(#1=a . #1#))
+
 ;; Make sure we don't enter infinite recursion when checking this one.
 (defalias 'test-recursive
   #'(lambda (x)
@@ -94,3 +97,4 @@
 (test-recursive-3 'c)
 (test-recursive-4 'd)
 (test-recursive-3 'e)
+



reply via email to

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