diff options
author | Kevin Ryde <user42@zip.com.au> | 2009-11-24 23:13:55 +0000 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2009-11-24 23:13:55 +0000 |
commit | f69c67b6f700116815462edfb1f8ad204aead25e (patch) | |
tree | 81b9bdaef8ea925af0be3cbab0a9fa081c99aa80 /lisp/emacs-lisp | |
parent | 4cf8971b400ff41bfe3609f0d0626e8119555766 (diff) | |
download | emacs-f69c67b6f700116815462edfb1f8ad204aead25e.tar.gz emacs-f69c67b6f700116815462edfb1f8ad204aead25e.tar.bz2 emacs-f69c67b6f700116815462edfb1f8ad204aead25e.zip |
* emacs-lisp/checkdoc.el (checkdoc-proper-noun-regexp): Build
value with regexp-opt instead of explicit joining loop. (My
Bug#4927.)
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/checkdoc.el | 9 |
1 files changed, 3 insertions, 6 deletions
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." ;; "[.!?]" 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 "\\)\\(\\_>\\|[.!?][ \t\n\"]\\)")) + (concat "\\_<" + (regexp-opt checkdoc-proper-noun-list t) + "\\(\\_>\\|[.!?][ \t\n\"]\\)") "Regular expression derived from `checkdoc-proper-noun-regexp'.") (defvar checkdoc-common-verbs-regexp nil |