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

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

[nongnu] elpa/parseclj b26fadbc05 128/185: Get rid of `parseclj-lex-erro


From: ELPA Syncer
Subject: [nongnu] elpa/parseclj b26fadbc05 128/185: Get rid of `parseclj-lex-error-token` side-effect
Date: Tue, 28 Dec 2021 14:05:28 -0500 (EST)

branch: elpa/parseclj
commit b26fadbc05af7c66acb37235704ad02ed6c61fbe
Author: Daniel Barreto <daniel.barreto.n@gmail.com>
Commit: Daniel Barreto <daniel.barreto.n@gmail.com>

    Get rid of `parseclj-lex-error-token` side-effect
---
 parseclj-lex.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/parseclj-lex.el b/parseclj-lex.el
index 4c3dc2511b..f23580d5dd 100644
--- a/parseclj-lex.el
+++ b/parseclj-lex.el
@@ -61,8 +61,6 @@ Other ATTRIBUTES can be given as a flat list of key-value 
pairs."
   "Create a lexer error token starting at POS.
 ERROR-TYPE is an optional keyword to attach to the created token,
 as the means for providing more information on the error."
-  (when (= pos (point))
-    (right-char))
   (apply #'parseclj-lex-token
          :lex-error
          (buffer-substring-no-properties pos (point))
@@ -420,7 +418,9 @@ See `parseclj-lex-token'."
             (parseclj-lex-error-token pos :invalid-hashtag-dispatcher)))))
 
        (t
-        (parseclj-lex-error-token pos))))))
+        (progn
+          (right-char)
+          (parseclj-lex-error-token pos)))))))
 
 (provide 'parseclj-lex)
 



reply via email to

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