[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/relint 88ccc9c 2/9: Stronger regexp-generating variable
From: |
Mattias Engdegård |
Subject: |
[elpa] externals/relint 88ccc9c 2/9: Stronger regexp-generating variable check |
Date: |
Sat, 13 Apr 2019 12:51:29 -0400 (EDT) |
branch: externals/relint
commit 88ccc9cc914fe9007d5afb589f7af6c36d8414e3
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>
Stronger regexp-generating variable check
If the variable contents do not reveal anything, look at the name.
---
relint.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/relint.el b/relint.el
index 0d3a2f6..4db34d5 100644
--- a/relint.el
+++ b/relint.el
@@ -731,9 +731,10 @@
(cond
((symbolp expr)
(and (not (memq expr '(nil t)))
- (let ((def (assq expr relint--variables)))
- (if def
- (relint--regexp-generators (cdr def) expanded)
+ ;; Check both variable contents and name.
+ (or (let ((def (assq expr relint--variables)))
+ (and def
+ (relint--regexp-generators (cdr def) expanded)))
(and (or (memq expr '(page-delimiter paragraph-separate
paragraph-start sentence-end))
;; This is guesswork, but effective.
@@ -742,7 +743,7 @@
(or "-regexp" "-regex" "-re"))
eos)
(symbol-name expr)))
- (list expr))))))
+ (list expr)))))
((atom expr) nil)
((memq (car expr) '(regexp-quote regexp-opt regexp-opt-charset
rx rx-to-string wildcard-to-regexp read-regexp
- [elpa] externals/relint updated (fdfb2d7 -> a146c2c), Mattias Engdegård, 2019/04/13
- [elpa] externals/relint 973241a 1/9: Fix typo in comment, Mattias Engdegård, 2019/04/13
- [elpa] externals/relint 88ccc9c 2/9: Stronger regexp-generating variable check,
Mattias Engdegård <=
- [elpa] externals/relint b8f617e 4/9: Various code simplifications, Mattias Engdegård, 2019/04/13
- [elpa] externals/relint cf39690 3/9: Clean-ups and safety fixes, Mattias Engdegård, 2019/04/13
- [elpa] externals/relint c315148 6/9: Treat #' and , @ correctly when finding position, Mattias Engdegård, 2019/04/13
- [elpa] externals/relint 301b803 5/9: Use doc strings instead of comments preceding functions, Mattias Engdegård, 2019/04/13
- [elpa] externals/relint 2471efb 8/9: Detailed diagnostics descriptions in README.org, Mattias Engdegård, 2019/04/13
- [elpa] externals/relint a146c2c 9/9: Increment version to 1.7, Mattias Engdegård, 2019/04/13
- [elpa] externals/relint 7db3e2e 7/9: Collect all functions, macros and aliases, Mattias Engdegård, 2019/04/13