Function: info-xref-check-all-custom
info-xref-check-all-custom is an autoloaded, interactive and
byte-compiled function defined in info-xref.el.gz.
Signature
(info-xref-check-all-custom)
Documentation
Check info references in all customize groups and variables.
Info references can be in custom-manual or info-link entries
of the custom-links for a variable.
Any custom-load autoloads in variables are loaded in order to
get full link information. This will be a lot of Lisp packages
and can take a long time.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/info-xref.el.gz
;;;###autoload
(defun info-xref-check-all-custom ()
"Check info references in all customize groups and variables.
Info references can be in `custom-manual' or `info-link' entries
of the `custom-links' for a variable.
Any `custom-load' autoloads in variables are loaded in order to
get full link information. This will be a lot of Lisp packages
and can take a long time."
(interactive)
(info-xref-with-output
;; `custom-load-symbol' is not used, since it quietly ignores errors, but
;; we want to show them since they mean incomplete checking.
;;
;; Just one pass through mapatoms is made. There shouldn't be any new
;; custom-loads setup by packages loaded.
;;
(info-xref-output "Loading custom-load autoloads ...")
(require 'cus-start)
(require 'cus-load)
;; These are `setq' rather than `let' since a let would unbind the
;; variables after viper.el/gnus-registry.el have loaded, defeating the
;; defvars in those files. Of course it'd be better if those files
;; didn't make interactive queries on loading at all, to allow for
;; programmatic loading like here.
(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-registry.el querying
(mapatoms
(lambda (symbol)
(dolist (load (get symbol 'custom-loads))
(cond ((symbolp load)
(condition-case cause (require load)
(error
(info-xref-output "Symbol `%s': cannot require `%s': %s"
symbol load cause))))
;; skip if previously loaded
((assoc load load-history))
((assoc (locate-library load) load-history))
(t
(condition-case err
(load load)
(error
(info-xref-output "Symbol `%s': cannot load \"%s\": %s"
symbol load
(error-message-string err)))))))))
;; Don't bother to check whether the info file exists as opposed to just
;; a missing node. If you have the code then you should have the
;; documentation, so a wrong node name will be the usual fault.
;;
(info-xref-output "\nChecking custom-links references ...")
(mapatoms
(lambda (symbol)
(dolist (link (get symbol 'custom-links))
(when (memq (car link) '(custom-manual info-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))
(incf info-xref-good)
(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"
symbol
(symbol-file symbol 'defvar)
(cadr link)))))))))