]> git.eshelyaron.com Git - emacs.git/commitdiff
checkdoc: Only look for commonly used modifier keys
authorStefan Kangas <stefan@marxist.se>
Sat, 18 Sep 2021 08:39:35 +0000 (10:39 +0200)
committerStefan Kangas <stefan@marxist.se>
Sat, 18 Sep 2021 08:44:32 +0000 (10:44 +0200)
* 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.

lisp/emacs-lisp/checkdoc.el

index f8df223ce96b650a23f979200397fc775d97eb67..2c30815d855aa561dca4670a97472d017bfd9ebf 100644 (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)))