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

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

[elpa] externals/relint 5af5466 26/44: Scan string-trim arguments


From: Mattias Engdegård
Subject: [elpa] externals/relint 5af5466 26/44: Scan string-trim arguments
Date: Tue, 26 Mar 2019 12:57:28 -0400 (EDT)

branch: externals/relint
commit 5af546669c44d72e54df4938ab37cee6267f00c4
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>

    Scan string-trim arguments
---
 trawl.el | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/trawl.el b/trawl.el
index 2a71f65..254fdbf 100644
--- a/trawl.el
+++ b/trawl.el
@@ -626,13 +626,21 @@
        (trawl--check-re re-arg (format "call to %s" (car form))
                         file pos (cons 1 path))))
     (`(,(or `split-string `split-string-and-unquote
-            `string-trim-left `string-trim-right
+            `string-trim-left `string-trim-right `string-trim
             `directory-files-recursively)
        ,_ ,re-arg . ,rest)
      (unless (and (symbolp re-arg)
                   (memq re-arg trawl--checked-variables))
        (trawl--check-re re-arg (format "call to %s" (car form))
                         file pos (cons 2 path)))
+     ;; string-trim has another regexp argument (trim, arg 3)
+     (when (and (eq (car form) 'string-trim)
+                (car rest))
+       (let ((right (car rest)))
+         (unless (and (symbolp right)
+                      (memq right trawl--checked-variables))
+           (trawl--check-re right (format "call to %s" (car form))
+                            file pos (cons 3 path)))))
      ;; split-string has another regexp argument (trim, arg 4)
      (when (and (eq (car form) 'split-string)
                 (cadr rest))



reply via email to

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