]> git.eshelyaron.com Git - emacs.git/commitdiff
(checkdoc-this-string-valid-engine):
authorGerd Moellmann <gerd@gnu.org>
Mon, 17 Sep 2001 15:51:54 +0000 (15:51 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 17 Sep 2001 15:51:54 +0000 (15:51 +0000)
Check for '(' in column 0 of doc string.

lisp/emacs-lisp/checkdoc.el

index 947fcb3ab9c4637fdac40de3bb3ed1f6e3c58666..fe075baf5368772545dcce9b0cacc76d48a5df5a 100644 (file)
@@ -1374,6 +1374,17 @@ regexp short cuts work.  FP is the function defun information."
              "Second line should not have indentation"
              (match-beginning 1)
              (match-end 1)))))
+     ;; * Check for '(' in column 0.
+     (save-excursion
+       (when (re-search-forward "^(" e t)
+        (if (checkdoc-autofix-ask-replace (match-beginning 0)
+                                          (match-end 0)
+                                          "Escape this '('? "
+                                          "\\(")
+            nil
+          (checkdoc-create-error
+           "Open parenthesis in column 0 should be escaped"
+           (match-beginning 0) (match-end 0)))))
      ;; * Do not start or end a documentation string with whitespace.
      (let (start end)
        (if (or (if (looking-at "\"\\([ \t\n]+\\)")