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

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

[elpa] externals/relint ae9e68d: Eliminate a frequent regexp match


From: ELPA Syncer
Subject: [elpa] externals/relint ae9e68d: Eliminate a frequent regexp match
Date: Tue, 6 Apr 2021 11:57:11 -0400 (EDT)

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

    Eliminate a frequent regexp match
    
    Using `char-after` with `memq instead of `looking-at` gives a (tiny)
    speed-up.
---
 relint.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/relint.el b/relint.el
index 5863bb9..3e3604c 100644
--- a/relint.el
+++ b/relint.el
@@ -2269,7 +2269,7 @@ STRING-START is the start of the string literal (first 
double quote)."
     (when (eq (following-char) ?\")
       (let ((string-start (point)))
         (forward-char)
-        (while (not (looking-at (rx (or ?\" eot))))
+        (while (not (memq (char-after) '(?\" nil)))
           (when (looking-at
                  (rx (1+ (or (seq ?\\ (any "0-9" "xuUN" "abfnrtv"
                                            "des" "^" " "



reply via email to

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