aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Ryde2009-11-08 21:49:49 +0000
committerKevin Ryde2009-11-08 21:49:49 +0000
commit8bf7ed70eb1636cddb448658efcb9df56a4c40b3 (patch)
tree57ebed487a852abc37374553b573470bd1e2f2ed
parent951802d0c19bb13d5d93e914f6b18c4548336261 (diff)
downloademacs-8bf7ed70eb1636cddb448658efcb9df56a4c40b3.tar.gz
emacs-8bf7ed70eb1636cddb448658efcb9df56a4c40b3.zip
* emacs-lisp/checkdoc.el (checkdoc-proper-noun-regexp): Match noun
at end of sentence (my Bug#4818).
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/checkdoc.el5
2 files changed, 9 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d353fdf7832..bb8c9a53259 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12009-11-08 Kevin Ryde <user42@zip.com.au>
2
3 * emacs-lisp/checkdoc.el (checkdoc-proper-noun-regexp): Match noun
4 at end of sentence (my Bug#4818).
5
12009-11-08 Jared Finder <jfinder@crypticstudios.com> 62009-11-08 Jared Finder <jfinder@crypticstudios.com>
2 7
3 * progmodes/compile.el (compilation-error-regexp-alist-alist): 8 * progmodes/compile.el (compilation-error-regexp-alist-alist):
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."
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