branch: externals/relint commit ae9e68d61b902a22cafe766d7fbc353cc1ed1f71 Author: Mattias EngdegÄrd <matti...@acm.org> Commit: Mattias EngdegÄrd <matti...@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" "^" " "