# HG changeset patch # User Kevin Ryde # Date 1257716923 0 # Node ID 510f457168de633311341701a4ecd5035808ebd7 # Parent 1f553b32ab4fe4a96827f98e366561556f04bb52 * emacs-lisp/checkdoc.el (checkdoc-proper-noun-regexp): Match noun at end of sentence (my Bug#4818). diff -r 1f553b32ab4f -r 510f457168de lisp/emacs-lisp/checkdoc.el --- a/lisp/emacs-lisp/checkdoc.el Sun Nov 08 16:30:52 2009 +0000 +++ b/lisp/emacs-lisp/checkdoc.el Sun Nov 08 21:48:43 2009 +0000 @@ -331,12 +331,15 @@ "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