changeset 105783:588c96104e0c

* emacs-lisp/checkdoc.el (checkdoc-proper-noun-region-engine): Use help-xref-info-regexp and help-xref-url-regexp to identify links. (Further to Bug#3921).
author Kevin Ryde <user42@zip.com.au>
date Tue, 27 Oct 2009 22:52:19 +0000
parents 65f84b737fd8
children 51992684b560
files lisp/emacs-lisp/checkdoc.el
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/checkdoc.el	Tue Oct 27 11:55:13 2009 +0000
+++ b/lisp/emacs-lisp/checkdoc.el	Tue Oct 27 22:52:19 2009 +0000
@@ -173,6 +173,9 @@
 (defvar checkdoc-version "0.6.1"
   "Release version of checkdoc you are currently running.")
 
+(require 'help-mode) ;; for help-xref-info-regexp
+(require 'thingatpt) ;; for handy thing-at-point-looking-at
+
 (defvar compilation-error-regexp-alist)
 (defvar compilation-mode-font-lock-keywords)
 
@@ -2017,11 +2020,11 @@
 			 (not (and (= ?/ (char-after e))
 				   (= ?/ (char-before b))))
 			 (not (checkdoc-in-example-string-p begin end))
-			 ;; info node
-			 (not (save-excursion
-				(goto-char b)
-				(looking-back "\\<[Ii]nfo[ \t\n]+\\(node\\|anchor\\)[ \t\n]+`("
-					      (line-beginning-position)))))
+			 ;; info or url links left alone
+ 			 (not (thing-at-point-looking-at
+ 			       help-xref-info-regexp))
+			 (not (thing-at-point-looking-at
+ 			       help-xref-url-regexp)))
 		    (if (checkdoc-autofix-ask-replace
 			 b e (format "Text %s should be capitalized.  Fix? "
 				     text)