From 79a9b50621ec22640358bd6b94b65d14d747c644 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 24 Sep 2021 23:42:08 +0200 Subject: [PATCH] checkdoc: Don't ask to disambiguate mode names * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): Don't ask to disambiguate mode names. (Bug#4110) --- lisp/emacs-lisp/checkdoc.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 0862e66ac5d..74c27343bc4 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -1653,7 +1653,10 @@ mouse-[0-3]\\)\\)\\>")) me (match-end 1)) (if (and sym (boundp sym) (fboundp sym) checkdoc--disambiguate-symbol-flag - (save-excursion + ;; Mode names do not need disambiguating. (Bug#4110) + (not (string-match (rx "-mode" string-end) + (symbol-name sym))) + (save-excursion (goto-char mb) (forward-word-strictly -1) (not (looking-at -- 2.39.2