1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

checkdoc: Only look for commonly used modifier keys

* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
Search for the modifier key "s-", but not the modifier key "A-".
The latter is very uncommon and leads to false positives.
This commit is contained in:
Stefan Kangas 2021-09-18 10:39:35 +02:00
parent 2557c009bb
commit 6084c7e0f4

View file

@ -1545,7 +1545,9 @@ may require more formatting")
;; Instead, use the `\\[...]' construct to stand for them.
(save-excursion
(let ((f nil) (m nil) (start (point))
(re "[^`A-Za-z0-9_]\\([CMA]-[a-zA-Z]\\|\\(\\([CMA]-\\)?\
;; Ignore the "A-" modifier: it is uncommon in practice,
;; and leads to false positives in regexp ranges.
(re "[^`A-Za-z0-9_]\\([CMs]-[a-zA-Z]\\|\\(\\([CMs]-\\)?\
mouse-[0-3]\\)\\)\\>"))
;; Find the first key sequence not in a sample
(while (and (not f) (setq m (re-search-forward re e t)))