X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/07051573a81cc2eea9fb6db7409f37ad64842591..937640a621a4ce2e5e56eaecca37a2a28a584318:/lisp/emacs-lisp/checkdoc.el?ds=sidebyside diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 2aba3ea254..cc2be89065 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -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))))