[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/relint c8fd922 12/16: Minor looking-at optimisation
From: |
Mattias Engdegård |
Subject: |
[elpa] externals/relint c8fd922 12/16: Minor looking-at optimisation |
Date: |
Mon, 30 Nov 2020 05:00:59 -0500 (EST) |
branch: externals/relint
commit c8fd9222c36c1f45d32eeb2dcfdb70a956281f4a
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Minor looking-at optimisation
Replace call to `looking-at` with `following-char` when only a single
character is matched: faster, and does not consume regexp cache.
---
relint.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/relint.el b/relint.el
index 1b8a69e..5ab667e 100644
--- a/relint.el
+++ b/relint.el
@@ -2251,9 +2251,9 @@ STRING-START is the start of the string literal (first
double quote)."
(seq ";" (0+ nonl))
(not (any ?\" ?\; ?? ?\\))))))
(goto-char (match-end 0)))
- (when (looking-at (rx ?\"))
+ (when (eq (following-char) ?\")
(let ((string-start (point)))
- (goto-char (match-end 0))
+ (forward-char)
(while (not (looking-at (rx (or ?\" eot))))
(when (looking-at
(rx (1+ (or (seq ?\\ (any "0-9" "xuUN" "abfnrtv"
- [elpa] externals/relint updated (0c35e02 -> 26639c5), Mattias Engdegård, 2020/11/30
- [elpa] externals/relint a1ea26c 01/16: Check regexp arguments to more functions, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint d0fa8a8 10/16: Fix false positives in regexp provenance checks, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 29e5427 11/16: Recognise a few more `featurep` arguments, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 26639c5 16/16: Require xr 1.20, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 7690e3a 08/16: Scan font-lock-defaults correctly, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 4b78e14 09/16: Add table of contents to README, and some advice, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint c792bde 15/16: Perform Emacs version check at compile time, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint c8fd922 12/16: Minor looking-at optimisation,
Mattias Engdegård <=
- [elpa] externals/relint 5720e12 07/16: Scan regexp arguments to functions in s.el, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint f0241bc 13/16: Increment version to 1.19, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 9173a91 05/16: Add progress indicator for interactive relint-directory, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 5572c57 14/16: Emacs 26 compatibility: `directory-files-recursively`, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 1c66438 06/16: Add string-search and string-replace to the list of pure functions, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint b572fcd 02/16: Run automatic tests on Emacs 27.1, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 14a5135 03/16: Minor README correction, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 8ee9f79 04/16: Avoid descending into .git/ when looking for .el files, Mattias Engdegård, 2020/11/30