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

[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'



reply via email to

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