[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/relint 0ed50a660b 2/6: Minor performance improvement (m
From: |
ELPA Syncer |
Subject: |
[elpa] externals/relint 0ed50a660b 2/6: Minor performance improvement (move code) |
Date: |
Sat, 9 Sep 2023 09:58:46 -0400 (EDT) |
branch: externals/relint
commit 0ed50a660b53fe316b637e429a1c8263b49be5ed
Author: Mattias EngdegÄrd <mattiase@acm.org>
Commit: Mattias EngdegÄrd <mattiase@acm.org>
Minor performance improvement (move code)
---
relint.el | 34 ++++++++++++++++------------------
1 file changed, 16 insertions(+), 18 deletions(-)
diff --git a/relint.el b/relint.el
index 82936225d3..0895741664 100644
--- a/relint.el
+++ b/relint.el
@@ -2369,26 +2369,24 @@ directly."
(let ((alias (assq name relint--alias-defs)))
(when alias
(relint--check-form-recursively-2
- (cons (cdr alias) args) mutables pos path))))
+ (cons (cdr alias) args) mutables pos path)))
+
+ ;; Check calls to remembered functions with regexp arguments.
+ (let ((indices (cdr (assq name relint--regexp-functions))))
+ (when indices
+ (let ((index 0))
+ (while (and indices (consp args))
+ (when (= index (car indices))
+ (unless (and (symbolp (car args))
+ (memq (car args) relint--checked-variables))
+ (relint--check-re (car args)
+ (cons 'call-to (car form))
+ pos (cons (1+ index) path)))
+ (setq indices (cdr indices)))
+ (setq args (cdr args))
+ (setq index (1+ index)))))))
)
- ;; Check calls to remembered functions with regexp arguments.
- (when (consp form)
- (let ((indices (cdr (assq (car form) relint--regexp-functions))))
- (when indices
- (let ((index 0)
- (args (cdr form)))
- (while (and indices (consp args))
- (when (= index (car indices))
- (unless (and (symbolp (car args))
- (memq (car args) relint--checked-variables))
- (relint--check-re (car args)
- (cons 'call-to (car form))
- pos (cons (1+ index) path)))
- (setq indices (cdr indices)))
- (setq args (cdr args))
- (setq index (1+ index)))))))
-
;; FIXME: All function applications, and some macros / special forms
;; (prog{1,2,n}, save-excursion...) could be scanned with full
;; mutables since all args are evaluated once.
- [elpa] externals/relint updated (380754be9c -> 7c99ab97ed), ELPA Syncer, 2023/09/09
- [elpa] externals/relint ab6b469e10 1/6: Performance: fewer `format` calls when scanning, ELPA Syncer, 2023/09/09
- [elpa] externals/relint 0ed50a660b 2/6: Minor performance improvement (move code),
ELPA Syncer <=
- [elpa] externals/relint f40380855d 5/6: Set next-error-last-buffer when running interactively, ELPA Syncer, 2023/09/09
- [elpa] externals/relint 9e75ae54cf 4/6: Add regression test for dotted forms, ELPA Syncer, 2023/09/09
- [elpa] externals/relint 7c99ab97ed 6/6: Provide proper-list-p compat code for Emacs 26, ELPA Syncer, 2023/09/09
- [elpa] externals/relint 32e1523f76 3/6: Drop pcase in hot path for better performance, ELPA Syncer, 2023/09/09