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

[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.



reply via email to

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