[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/relint 32dbad1 07/12: Scan arguments to syntax-properti
From: |
Mattias Engdegård |
Subject: |
[elpa] externals/relint 32dbad1 07/12: Scan arguments to syntax-propertize-{precompile-}rules |
Date: |
Thu, 30 Jan 2020 10:53:40 -0500 (EST) |
branch: externals/relint
commit 32dbad1f47628f9ce6c401c554cf8d6d552d929e
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>
Scan arguments to syntax-propertize-{precompile-}rules
---
relint.el | 9 +++++++++
test/1.elisp | 12 ++++++++++++
test/1.expected | 12 ++++++++++++
3 files changed, 33 insertions(+)
diff --git a/relint.el b/relint.el
index 02ea60d..b59c559 100644
--- a/relint.el
+++ b/relint.el
@@ -1586,6 +1586,15 @@ directly."
(relint--check-font-lock-keywords font-lock-list origin
file pos (cons 4 path))
(relint--check-list auto-mode-list origin file pos (cons 5 path))))
+ (`(,(or 'syntax-propertize-rules 'syntax-propertize-precompile-rules)
+ . ,rules)
+ (let ((index 1))
+ (dolist (item rules)
+ (when (consp item)
+ (relint--check-re (car item)
+ (format "call to %s" (car form))
+ file pos (cons 0 (cons index path))))
+ (setq index (1+ index)))))
(`(,name . ,args)
(let ((alias (assq name relint--alias-defs)))
(when alias
diff --git a/test/1.elisp b/test/1.elisp
index 982803d..9e934ae 100644
--- a/test/1.elisp
+++ b/test/1.elisp
@@ -85,3 +85,15 @@
("2^" argl))
'("a" "b++" "c")
nil)
+
+(defun my-syn-1 ()
+ (syntax-propertize-rules
+ ("thing" stuff)
+ ("$1$" bad)
+ ("^2^" alsobad)))
+
+(defun my-syn-2 ()
+ (syntax-propertize-precompile-rules
+ ("thing" stuff)
+ ("$3$" bad)
+ ("^4^" alsobad)))
diff --git a/test/1.expected b/test/1.expected
index 6e84f44..e31af97 100644
--- a/test/1.expected
+++ b/test/1.expected
@@ -140,3 +140,15 @@
1.elisp:86:3: In define-generic-mode my-mode: Repetition of repetition (pos 2)
"b++"
..^
+1.elisp:92:5: In call to syntax-propertize-rules: Unescaped literal `$' (pos 0)
+ "$1$"
+ ^
+1.elisp:93:5: In call to syntax-propertize-rules: Unescaped literal `^' (pos 2)
+ "^2^"
+ ..^
+1.elisp:98:5: In call to syntax-propertize-precompile-rules: Unescaped literal
`$' (pos 0)
+ "$3$"
+ ^
+1.elisp:99:5: In call to syntax-propertize-precompile-rules: Unescaped literal
`^' (pos 2)
+ "^4^"
+ ..^
- [elpa] externals/relint updated (5c6079b -> 3315f03), Mattias Engdegård, 2020/01/30
- [elpa] externals/relint 1103f5c 01/12: Suppress error summary in noninteractive mode if no errors (bug #6), Mattias Engdegård, 2020/01/30
- [elpa] externals/relint 3885977 03/12: Adjust package header, Mattias Engdegård, 2020/01/30
- [elpa] externals/relint f5bbfdb 02/12: Describe exit status in relint-batch doc string, Mattias Engdegård, 2020/01/30
- [elpa] externals/relint 2ebd33d 04/12: Disable tests requiring Emacs 27 for the time being (bug #7), Mattias Engdegård, 2020/01/30
- [elpa] externals/relint 800f5cc 06/12: Scan function/macro doc strings for hints to regexp arguments, Mattias Engdegård, 2020/01/30
- [elpa] externals/relint ff06875 09/12: Scan mutation and binding of certain known regexp variables, Mattias Engdegård, 2020/01/30
- [elpa] externals/relint dcb474b 10/12: Detect user-defined regexp-returning functions, Mattias Engdegård, 2020/01/30
- [elpa] externals/relint ccfc9e0 08/12: Scan all variables whose name contain '-font-lock-keywords', Mattias Engdegård, 2020/01/30
- [elpa] externals/relint 32dbad1 07/12: Scan arguments to syntax-propertize-{precompile-}rules,
Mattias Engdegård <=
- [elpa] externals/relint 641cf71 05/12: Require Emacs 26.1 (for mapcan), Mattias Engdegård, 2020/01/30
- [elpa] externals/relint 5b684ea 11/12: Require xr 1.15, Mattias Engdegård, 2020/01/30
- [elpa] externals/relint 3315f03 12/12: Increment version to 1.13, Mattias Engdegård, 2020/01/30