]> git.eshelyaron.com Git - emacs.git/commitdiff
(checkdoc-this-string-valid-engine):
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 12 Sep 2004 20:17:53 +0000 (20:17 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 12 Sep 2004 20:17:53 +0000 (20:17 +0000)
Don't tell to use \\{...} when it's already done.

lisp/emacs-lisp/checkdoc.el

index 2aba3ea254c56966a1647ad3ea1ba30e61689f80..cc2be8906576372cead205ea57b1e6664db14cc0 100644 (file)
@@ -1561,8 +1561,9 @@ mouse-[0-3]\\)\\)\\>"))
      ;; to describe the most important commands in your major mode, and
      ;; then use `\\{...}' to display the rest of the mode's keymap.
      (save-excursion
-       (if (re-search-forward "\\\\\\\\\\[\\w+" e t
-                             (1+ checkdoc-max-keyref-before-warn))
+       (if (and (re-search-forward "\\\\\\\\\\[\\w+" e t
+                                  (1+ checkdoc-max-keyref-before-warn))
+               (not (re-search-forward "\\\\\\\\{\\w+}" e t)))
           (checkdoc-create-error
            "Too many occurrences of \\[function].  Use \\{keymap} instead"
            s (marker-position e))))