GNU bug report logs - #3921
23.1.50; checkdoc allow uncapitalized info node links

Previous Next

Package: emacs;

Reported by: Kevin Ryde <user42 <at> zip.com.au>

Date: Fri, 24 Jul 2009 23:05:04 UTC

Severity: normal

Done: Kevin Ryde <user42 <at> zip.com.au>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Kevin Ryde <user42 <at> zip.com.au>
To: 3921 <at> debbugs.gnu.org, control <at> debbugs.gnu.org
Cc: Chong Yidong <cyd <at> stupidchicken.com>
Subject: bug#3921: 23.1.50; checkdoc allow uncapitalized info node links
Date: Sun, 25 Oct 2009 10:38:26 +1100
[Message part 1 (text/plain, inline)]
reopen 3921
thanks

Chong Yidong <cyd <at> stupidchicken.com> writes:
>
> I checked in a slightly different fix.

Reopening as I believe the looking-back limit prevents line-wrapped
links working, like the foo.el below.

But why not help-xref-info-regexp?  Less code, no duplication of
patterns.  For a lisp tool there's no need to hold back on what
libraries are loaded -- in fact letting someone else do the work is a
very good thing! :-)

(The worst duplication I struck lately was a while ago in info.el when
digging around some node names.  I recall unlovely duplication of
patterns, making life hard if looking to tighten or loosen.)


I thought of the URL links only afterwards, and didn't do anything about
it.  help-xref-url-regexp would again seem good as an authoritative
pattern.


[checkdoc.el.info-link-2.diff (text/x-diff, inline)]
--- checkdoc.el.~1.78.~	2009-10-25 08:57:10.000000000 +1100
+++ checkdoc.el	2009-10-25 10:05:53.000000000 +1100
@@ -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)
[foo.el (application/emacs-lisp, attachment)]

This bug report was last modified 15 years and 265 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.