changeset 105917:510f457168de

* emacs-lisp/checkdoc.el (checkdoc-proper-noun-regexp): Match noun at end of sentence (my Bug#4818).
author Kevin Ryde <user42@zip.com.au>
date Sun, 08 Nov 2009 21:48:43 +0000
parents 1f553b32ab4f
children b2ce7c8bf1e6
files lisp/emacs-lisp/checkdoc.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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