aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Ryde2009-11-24 23:13:55 +0000
committerKevin Ryde2009-11-24 23:13:55 +0000
commitf69c67b6f700116815462edfb1f8ad204aead25e (patch)
tree81b9bdaef8ea925af0be3cbab0a9fa081c99aa80
parent4cf8971b400ff41bfe3609f0d0626e8119555766 (diff)
downloademacs-f69c67b6f700116815462edfb1f8ad204aead25e.tar.gz
emacs-f69c67b6f700116815462edfb1f8ad204aead25e.zip
* emacs-lisp/checkdoc.el (checkdoc-proper-noun-regexp): Build
value with regexp-opt instead of explicit joining loop. (My Bug#4927.)
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/emacs-lisp/checkdoc.el9
2 files changed, 7 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 021ae0db2c0..04cbca0e721 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12009-11-24 Kevin Ryde <user42@zip.com.au> 12009-11-24 Kevin Ryde <user42@zip.com.au>
2 2
3 * emacs-lisp/checkdoc.el (checkdoc-proper-noun-regexp): Build
4 value with regexp-opt instead of explicit joining loop. (My
5 Bug#4927.)
6
3 * emacs-lisp/elint.el (elint-add-required-env): Better error message 7 * emacs-lisp/elint.el (elint-add-required-env): Better error message
4 when .el source file not found or other error. 8 when .el source file not found or other error.
5 9
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 7140c997283..5e8d2e084ff 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -334,12 +334,9 @@ This should be set in an Emacs Lisp file's local variables."
334 ;; "[.!?]" is for noun at end of a sentence, since those chars 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 \\_>. 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. 336 ;; The \" allows it to be the last sentence in a docstring too.
337 (let ((expr "\\_<\\(") 337 (concat "\\_<"
338 (l checkdoc-proper-noun-list)) 338 (regexp-opt checkdoc-proper-noun-list t)
339 (while l 339 "\\(\\_>\\|[.!?][ \t\n\"]\\)")
340 (setq expr (concat expr (car l) (if (cdr l) "\\|" ""))
341 l (cdr l)))
342 (concat expr "\\)\\(\\_>\\|[.!?][ \t\n\"]\\)"))
343 "Regular expression derived from `checkdoc-proper-noun-regexp'.") 340 "Regular expression derived from `checkdoc-proper-noun-regexp'.")
344 341
345(defvar checkdoc-common-verbs-regexp nil 342(defvar checkdoc-common-verbs-regexp nil