[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/relint 1dc96b5 05/10: Make font-lock-keywords errors ea
From: |
Mattias Engdegård |
Subject: |
[elpa] externals/relint 1dc96b5 05/10: Make font-lock-keywords errors easier to find |
Date: |
Sun, 4 Aug 2019 13:42:47 -0400 (EDT) |
branch: externals/relint
commit 1dc96b5bb65a84385fddddc80768e2ca3ef5a37b
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>
Make font-lock-keywords errors easier to find
At least in the (rare) case when the cdr is a symbol.
---
relint.el | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/relint.el b/relint.el
index 93149c2..76b2405 100644
--- a/relint.el
+++ b/relint.el
@@ -759,7 +759,17 @@ evaluated are nil."
(defun relint--check-font-lock-keywords (form name file pos path)
- (relint--check-list-any form name file pos path))
+ "Check a font-lock-keywords list. A regexp can be found in an element,
+or in the car of an element."
+ (dolist (elem (relint--get-list form file pos path))
+ (cond
+ ((stringp elem)
+ (relint--check-re-string elem name file pos path))
+ ((and (consp elem)
+ (stringp (car elem)))
+ (let* ((tag (and (symbolp (cdr elem)) (cdr elem)))
+ (ident (if tag (format "%s (%s)" name tag) name)))
+ (relint--check-re-string (car elem) ident file pos path))))))
(defun relint--check-compilation-error-regexp-alist-alist (form name
file pos path)
- [elpa] externals/relint updated (e049e93 -> bc001eb), Mattias Engdegård, 2019/08/04
- [elpa] externals/relint c5ac726 03/10: Handle rx `literal' and `regexp' forms correctly, Mattias Engdegård, 2019/08/04
- [elpa] externals/relint 77c3b87 04/10: Improved source traversal towards location, Mattias Engdegård, 2019/08/04
- [elpa] externals/relint 1dc96b5 05/10: Make font-lock-keywords errors easier to find,
Mattias Engdegård <=
- [elpa] externals/relint bc001eb 10/10: Increment version to 1.9, Mattias Engdegård, 2019/08/04
- [elpa] externals/relint 963e232 02/10: Check more defcustom strings, Mattias Engdegård, 2019/08/04
- [elpa] externals/relint c08baf2 06/10: Quote symbols with ' instead of ` in pcase, Mattias Engdegård, 2019/08/04
- [elpa] externals/relint 9238375 07/10: Detect more regexps in defcustom alists, Mattias Engdegård, 2019/08/04
- [elpa] externals/relint 943c728 08/10: Indentation fixes, Mattias Engdegård, 2019/08/04
- [elpa] externals/relint 298d407 01/10: Restructure `cond' expressions for better compilation, Mattias Engdegård, 2019/08/04
- [elpa] externals/relint 2e0bb22 09/10: Keep track of local variable bindings, Mattias Engdegård, 2019/08/04