Mercurial > emacs
comparison lisp/emacs-lisp/checkdoc.el @ 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 | 588c96104e0c |
children | 74465418bc07 |
comparison
equal
deleted
inserted
replaced
105916:1f553b32ab4f | 105917:510f457168de |
---|---|
329 (defvar checkdoc-proper-noun-list | 329 (defvar checkdoc-proper-noun-list |
330 '("ispell" "xemacs" "emacs" "lisp") | 330 '("ispell" "xemacs" "emacs" "lisp") |
331 "List of words (not capitalized) which should be capitalized.") | 331 "List of words (not capitalized) which should be capitalized.") |
332 | 332 |
333 (defvar checkdoc-proper-noun-regexp | 333 (defvar checkdoc-proper-noun-regexp |
334 ;; "[.!?]" is for noun at end of a sentence, since those chars | |
335 ;; are symbol syntax in emacs-lisp-mode and so don't match \\_>. | |
336 ;; The \" allows it to be the last sentence in a docstring too. | |
334 (let ((expr "\\_<\\(") | 337 (let ((expr "\\_<\\(") |
335 (l checkdoc-proper-noun-list)) | 338 (l checkdoc-proper-noun-list)) |
336 (while l | 339 (while l |
337 (setq expr (concat expr (car l) (if (cdr l) "\\|" "")) | 340 (setq expr (concat expr (car l) (if (cdr l) "\\|" "")) |
338 l (cdr l))) | 341 l (cdr l))) |
339 (concat expr "\\)\\_>")) | 342 (concat expr "\\)\\(\\_>\\|[.!?][ \t\n\"]\\)")) |
340 "Regular expression derived from `checkdoc-proper-noun-regexp'.") | 343 "Regular expression derived from `checkdoc-proper-noun-regexp'.") |
341 | 344 |
342 (defvar checkdoc-common-verbs-regexp nil | 345 (defvar checkdoc-common-verbs-regexp nil |
343 "Regular expression derived from `checkdoc-common-verbs-regexp'.") | 346 "Regular expression derived from `checkdoc-common-verbs-regexp'.") |
344 | 347 |