aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2021-09-13 07:17:50 +0200
committerStefan Kangas2021-09-14 07:56:06 +0200
commit269c8a0b633ac22472772a7d4cce99228a5357ba (patch)
treef405d92a128812ac539d0f3eb74b1f0a24bc9c41
parent5a34b65a3bfbf639a02b314efb4c9e69ba063c07 (diff)
downloademacs-269c8a0b633ac22472772a7d4cce99228a5357ba.tar.gz
emacs-269c8a0b633ac22472772a7d4cce99228a5357ba.zip
Minor improvements to checkdoc
* lisp/emacs-lisp/checkdoc.el (checkdoc-symbol-words): Add ignored values. (checkdoc-proper-noun-list): Remove XEmacs from list of words to capitalize; there is little need to insist on consistency here. (checkdoc-in-abbreviation-p): Add abbreviation "etc." and sort entries alphabetically.
-rw-r--r--lisp/emacs-lisp/checkdoc.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 1ab44e0f665..bc568f10fce 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -304,11 +304,12 @@ variable `checkdoc-common-verbs-wrong-voice' if you wish to add your own."
304Do not set this by hand, use a function like `checkdoc-current-buffer' 304Do not set this by hand, use a function like `checkdoc-current-buffer'
305with a universal argument.") 305with a universal argument.")
306 306
307(defcustom checkdoc-symbol-words nil 307(defcustom checkdoc-symbol-words '("byte-code" "command-line" "top-level")
308 "A list of symbol names (strings) which also happen to make good words. 308 "A list of symbol names (strings) which also happen to make good words.
309These words are ignored when unquoted symbols are searched for. 309These words are ignored when unquoted symbols are searched for.
310This should be set in an Emacs Lisp file's local variables." 310This should be set in an Emacs Lisp file's local variables."
311 :type '(repeat (symbol :tag "Word"))) 311 :type '(repeat (symbol :tag "Word"))
312 :version "28.1")
312;;;###autoload(put 'checkdoc-symbol-words 'safe-local-variable #'checkdoc-list-of-strings-p) 313;;;###autoload(put 'checkdoc-symbol-words 'safe-local-variable #'checkdoc-list-of-strings-p)
313 314
314;;;###autoload 315;;;###autoload
@@ -320,7 +321,7 @@ This should be set in an Emacs Lisp file's local variables."
320 (not (memq nil (mapcar #'stringp obj))))) 321 (not (memq nil (mapcar #'stringp obj)))))
321 322
322(defvar checkdoc-proper-noun-list 323(defvar checkdoc-proper-noun-list
323 '("ispell" "xemacs" "emacs" "lisp") 324 '("ispell" "emacs" "lisp")
324 "List of words (not capitalized) which should be capitalized.") 325 "List of words (not capitalized) which should be capitalized.")
325 326
326(defvar checkdoc-proper-noun-regexp 327(defvar checkdoc-proper-noun-regexp
@@ -2016,10 +2017,11 @@ Examples of abbreviations handled: \"e.g.\", \"i.e.\", \"cf.\"."
2016 ;; so we need to skip it here too. 2017 ;; so we need to skip it here too.
2017 (? "\\(") 2018 (? "\\(")
2018 ;; The abbreviations: 2019 ;; The abbreviations:
2019 (or (seq (any "iI") "." (any "eE")) ; i.e. 2020 (or (seq (any "cC") "f") ; cf.
2020 (seq (any "eE") ".g") ; e.g. 2021 (seq (any "eE") ".g") ; e.g.
2021 (seq (any "cC") "f"))) ; c.f. 2022 (seq (any "iI") "." (any "eE")))) ; i.e.
2022 "vs") ; vs. 2023 "etc" ; etc.
2024 "vs") ; vs.
2023 "."))) 2025 ".")))
2024 (error t)))) 2026 (error t))))
2025 2027