summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/checkdoc.el
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2009-11-08 21:49:49 +0000
committerKevin Ryde <user42@zip.com.au>2009-11-08 21:49:49 +0000
commit8bf7ed70eb1636cddb448658efcb9df56a4c40b3 (patch)
tree57ebed487a852abc37374553b573470bd1e2f2ed /lisp/emacs-lisp/checkdoc.el
parent951802d0c19bb13d5d93e914f6b18c4548336261 (diff)
downloademacs-8bf7ed70eb1636cddb448658efcb9df56a4c40b3.tar.gz
* emacs-lisp/checkdoc.el (checkdoc-proper-noun-regexp): Match noun
at end of sentence (my Bug#4818).
Diffstat (limited to 'lisp/emacs-lisp/checkdoc.el')
-rw-r--r--lisp/emacs-lisp/checkdoc.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 6b226be0b28..7140c997283 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -331,12 +331,15 @@ This should be set in an Emacs Lisp file's local variables."
"List of words (not capitalized) which should be capitalized.")
(defvar checkdoc-proper-noun-regexp
+ ;; "[.!?]" is for noun at end of a sentence, since those chars
+ ;; are symbol syntax in emacs-lisp-mode and so don't match \\_>.
+ ;; The \" allows it to be the last sentence in a docstring too.
(let ((expr "\\_<\\(")
(l checkdoc-proper-noun-list))
(while l
(setq expr (concat expr (car l) (if (cdr l) "\\|" ""))
l (cdr l)))
- (concat expr "\\)\\_>"))
+ (concat expr "\\)\\(\\_>\\|[.!?][ \t\n\"]\\)"))
"Regular expression derived from `checkdoc-proper-noun-regexp'.")
(defvar checkdoc-common-verbs-regexp nil