[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/relint e35fa2e 09/11: Fix doc string predicate
From: |
Mattias Engdegård |
Subject: |
[elpa] externals/relint e35fa2e 09/11: Fix doc string predicate |
Date: |
Sat, 20 Jun 2020 05:57:41 -0400 (EDT) |
branch: externals/relint
commit e35fa2ed4e212286c6981bac0e9f1cc76962627f
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Fix doc string predicate
String literals first in a list were incorrectly considered doc strings.
---
relint.el | 3 ++-
test/13.elisp | 3 ++-
test/13.expected | 1 +
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/relint.el b/relint.el
index f0557c4..3c6d05a 100644
--- a/relint.el
+++ b/relint.el
@@ -2145,7 +2145,8 @@ Return a list of (FORM . STARTING-POSITION)."
(looking-at (rx ":documentation" symbol-end)))))
(setq steps (1+ steps)))
(or
- (= steps 0) ; `:documentation' parameter
+ (and (= steps 0)
+ (looking-at (rx ":documentation")))
(and (= steps 3)
(looking-at (rx (or "defun" "defmacro" "defsubst" "defalias"
"defconst" "defvar" "defcustom"
diff --git a/test/13.elisp b/test/13.elisp
index 4c6fb35..58c1609 100644
--- a/test/13.elisp
+++ b/test/13.elisp
@@ -14,4 +14,5 @@
and \a \b \f \n \r \t \v \d \e \s \^P"))
(defun f2 ()
- (re-search-forward "\$\.x\+\+"))
+ (re-search-forward "\$\.x\+\+")
+ '("bracketed \q string"))
diff --git a/test/13.expected b/test/13.expected
index fd69f6f..8c721d5 100644
--- a/test/13.expected
+++ b/test/13.expected
@@ -15,3 +15,4 @@
"$.x++"
....^
13.elisp:17:30: Ineffective string escape `\+'
+13.elisp:18:16: Ineffective string escape `\q'
- [elpa] externals/relint updated (a54960a -> 0c35e02), Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 6bfba5c 01/11: Always output to stderr when running noninteractively, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 1ea9b91 05/11: Add tests for ineffective backslash check, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 0d80c1f 07/11: Rename various 'miscape' identifiers, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint e35fa2e 09/11: Fix doc string predicate,
Mattias Engdegård <=
- [elpa] externals/relint e8d8052 03/11: Add checking of ineffective backslashes in string literals, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 329df9c 02/11: Refactor framework, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 2de1106 04/11: Sort diagnostics by buffer position, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint a1c7bf5 06/11: Describe the ineffective backslash warning in README, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 0627d4d 08/11: Simplify (and speed up) string scanning regexp, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 0c35e02 11/11: Increment version to 1.18, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 6a86509 10/11: Tuned miscape filtering, Mattias Engdegård, 2020/06/20