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

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

[elpa] externals/relint 2c0644ef8e: Eliminate some unnecessary condition


From: ELPA Syncer
Subject: [elpa] externals/relint 2c0644ef8e: Eliminate some unnecessary conditions
Date: Mon, 12 Jun 2023 09:59:30 -0400 (EDT)

branch: externals/relint
commit 2c0644ef8eea8f3624cd6f7610e750d6eeb10e3b
Author: Mattias EngdegÄrd <mattiase@acm.org>
Commit: Mattias EngdegÄrd <mattiase@acm.org>

    Eliminate some unnecessary conditions
---
 relint.el | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/relint.el b/relint.el
index f619b1b6a4..22090d8642 100644
--- a/relint.el
+++ b/relint.el
@@ -1869,8 +1869,7 @@ directly."
            (cond
             ((memq name relint--known-regexp-variables)
              (relint--check-re expr name pos (cons i path)))
-            ((and (symbolp name) (string-match-p (rx "font-lock-keywords")
-                                                 (symbol-name name)))
+            ((string-match-p (rx "font-lock-keywords") (symbol-name name))
              (relint--check-font-lock-keywords expr name pos (cons i path)))
             ((eq name 'font-lock-defaults)
              (relint--check-font-lock-defaults expr name pos (cons i path)))
@@ -2080,8 +2079,7 @@ directly."
                                   (symbol-name name)))
               (relint--check-list re-arg name pos (cons 2 path) nil)
               (push name relint--checked-variables))
-             ((and (symbolp name) (string-match-p (rx "font-lock-keywords")
-                                                  (symbol-name name)))
+             ((string-match-p (rx "font-lock-keywords") (symbol-name name))
               (relint--check-font-lock-keywords re-arg name pos (cons 2 path))
               (push name relint--checked-variables))
              ((eq name 'compilation-error-regexp-alist-alist)
@@ -2148,13 +2146,12 @@ directly."
        (`(font-lock-add-keywords ,_ ,keywords . ,_)
         (relint--check-font-lock-keywords
          keywords (car form) pos (cons 2 path)))
-       (`(set (make-local-variable ',name) ,expr)
+       (`(set (make-local-variable ',(and (pred symbolp) name)) ,expr)
         (cond ((memq name relint--known-regexp-variables)
                (relint--check-re expr name pos (cons 2 path)))
               ((eq name 'font-lock-defaults)
                (relint--check-font-lock-defaults expr name pos (cons 2 path)))
-              ((and (symbolp name) (string-match-p (rx "font-lock-keywords")
-                                                   (symbol-name name)))
+              ((string-match-p (rx "font-lock-keywords") (symbol-name name))
                (relint--check-font-lock-keywords expr name pos (cons 2 path)))
               ((eq name 'imenu-generic-expression)
                (relint--check-imenu-generic-expression



reply via email to

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