]> code.delx.au - gnu-emacs/blobdiff - lisp/info-xref.el
* tramp.texi (top) [xxx, yyy, trampfn]: Provide two versions of
[gnu-emacs] / lisp / info-xref.el
index c56db2c94bbe70366b9c0396e50d606cc5a2bd1b..90a8d4968de961cca75cb02374be677b7ca631a2 100644 (file)
@@ -1,6 +1,6 @@
 ;;; info-xref.el --- check external references in an Info document
 
-;; Copyright (C) 2003-201 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2013 Free Software Foundation, Inc.
 
 ;; Author: Kevin Ryde <user42@zip.com.au>
 ;; Keywords: docs
@@ -45,8 +45,7 @@
 ;;; Code:
 
 (require 'info)
-(eval-when-compile
-  (require 'cl)) ;; for `incf'
+(eval-when-compile (require 'cl-lib)) ;; for `incf'
 
 ;;-----------------------------------------------------------------------------
 ;; vaguely generic
@@ -151,7 +150,7 @@ overall good/bad count summary inserted at the very end."
      (unless info-xref-in-progress
        (info-xref-output "done, %d good, %d bad, %d unavailable"
                          info-xref-good info-xref-bad info-xref-unavail))))
-  
+
 (defun info-xref-output (fmt &rest args)
   "Emit a `format'-ed message FMT+ARGS to the `info-xref-output-buffer'."
   (with-current-buffer info-xref-output-buffer
@@ -200,7 +199,7 @@ buffer's line and column of point."
     (save-excursion
       (save-window-excursion
         (prog1
-            (condition-case err
+            (condition-case nil
                 (progn
                   (Info-goto-node node
                                   (when (get-buffer "*info*")
@@ -239,11 +238,11 @@ buffer's line and column of point."
 
         ;; if the file exists, try the node
         (cond ((not (cdr (assoc file info-xref-xfile-alist)))
-               (incf info-xref-unavail))
+               (cl-incf info-xref-unavail))
               ((info-xref-goto-node-p node)
-               (incf info-xref-good))
+               (cl-incf info-xref-good))
               (t
-               (incf info-xref-bad)
+               (cl-incf info-xref-bad)
                (info-xref-output-error "no such node: %s" node)))))))
 
 
@@ -313,7 +312,7 @@ should be harmless."
   (interactive)
   (info-xref-check-list (info-xref-all-info-files)))
 
-;; An alternative for geting only top-level files here would be to simply
+;; An alternative for getting only top-level files here would be to simply
 ;; return all files and have info-xref-check-list not follow "Indirect:".
 ;; The current way seems better because it (potentially) gets the proper
 ;; top-level filename into the error messages, and suppresses duplicate "not
@@ -413,7 +412,7 @@ and can take a long time."
    (unless (boundp 'viper-mode)
      (setq viper-mode nil))  ;; avoid viper.el ask about viperizing
    (unless (boundp 'gnus-registry-install)
-     (setq gnus-registry-install nil))  ;; avoid gnus-registery.el querying
+     (setq gnus-registry-install nil))  ;; avoid gnus-registry.el querying
 
    (mapatoms
     (lambda (symbol)
@@ -447,8 +446,8 @@ and can take a long time."
           (if (eq :tag (cadr link))
               (setq link (cddr link)))
           (if (info-xref-goto-node-p (cadr link))
-              (incf info-xref-good)
-            (incf info-xref-bad)
+              (cl-incf info-xref-good)
+            (cl-incf info-xref-bad)
             ;; symbol-file gives nil for preloaded variables, would need
             ;; to copy what describe-variable does to show the right place
             (info-xref-output "Symbol `%s' (file %s): cannot goto node: %s"