(python-font-lock-keywords): Add `self' and other quasi-keywords.
[bpt/emacs.git] / lisp / info-xref.el
index 9f856d1..a6acfa8 100644 (file)
@@ -1,26 +1,26 @@
-;;; info-xref.el --- check external references in an Info document.
+;;; info-xref.el --- check external references in an Info document
+
+;; Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
-;; Copyright 2003, 2004 Free Software Foundation, Inc
-;;
 ;; Author: Kevin Ryde <user42@zip.com.au>
 ;; Keywords: docs
-;;
-;; info-xref.el is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by the
-;; Free Software Foundation; either version 2, or (at your option) any later
-;; version.
-;;
-;; info-xref.el is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
-;; Public License for more details.
-;;
-;; You can get a copy of the GNU General Public License online at
-;; http://www.gnu.org/licenses/gpl.txt, or you should have one in the file
-;; COPYING which comes with GNU Emacs and other GNU programs.  Failing that,
-;; write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
 
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
 ;; `Info-directory-list' then a lot of extraneous files might be read, which
 ;; will be time consuming but should be harmless.
 ;;
-;;
 ;; `M-x info-xref-check-all-custom' is a related command, it goes through
 ;; all info document references in customizable variables, checking them
 ;; like info file cross references.
 
-
-;;; Install:
-
-;; Put info-xref.el somewhere in your `load-path', and in your .emacs put
-;;
-;;     (autoload 'info-xref-check     "info-xref" nil t)
-;;     (autoload 'info-xref-check-all "info-xref" nil t)
-;;
-;; then
-;;
-;;     M-x info-xref-check
-;;
-;; and enter an info file name.
-
-
-;;; Emacsen:
-
-;; Designed for use with GNU Emacs 21.
-
-
-;;; History:
-
-;; Version 1 - the first version.
-
-
 ;;; Code:
 
 (require 'info)
@@ -164,19 +138,25 @@ should open up the purported top file and see what subfiles it says."
 ;; Some dynamic variables are used to share information with sub-functions
 ;; below.
 ;;
-;; info-xref-filename - current top-level filename, eg. /usr/info/foo.info.gz
-;;
 ;; info-xref-filename-header - a heading message for the current top-level
 ;;     filename, or "" when it's been printed.
 ;;
+(defvar info-xref-xfile-alist)
+;;
 ;; info-xref-good - count of good cross references.
 ;;
+(defvar info-xref-good)
+;;
 ;; info-xref-bad - count of bad cross references.
 ;;
+(defvar info-xref-bad)
+;;
 ;; info-xref-xfile-alist - indexed by "(foo)" with value nil or t according
 ;;     to whether "(foo)" exists or not.  This is used to suppress duplicate
 ;;     messages about foo not being available.  (Duplicates within one
 ;;     top-level file that is.)
+;;
+(defvar info-xref-filename-heading)
 
 (defun info-xref-check-list (filename-list)
   "Check external references in info documents in FILENAME-LIST."
@@ -321,7 +301,10 @@ quite a while."
        (lambda (symbol)
          (dolist (link (get symbol 'custom-links))
            (when (memq (car link) '(custom-manual info-link))
-             (if (info-xref-goto-node-p (cadr link))
+            ;; skip :tag part of (custom-manual :tag "Foo" "(foo)Node")
+            (if (eq :tag (cadr link))
+                (setq link (cddr link)))
+            (if (info-xref-goto-node-p (cadr link))
                  (setq good (1+ good))
                (setq bad (1+ bad))
                ;; symbol-file gives nil for preloaded variables, would need