;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:20:54 2007 ;;; from file /home/cyd/emacs/lisp/info-xref.el ;;; in Emacs version 22.0.99 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`info-xref.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'info) #@43 Name of the buffer for info-xref results. (defconst info-xref-results-buffer "*info-xref results*" (#$ . 581)) #@58 Check external references in FILENAME, an info document. (defalias 'info-xref-check #[(filename) "\301C!\207" [filename info-xref-check-list] 2 (#$ . 698) (list (let* ((default-filename (cond ((eq major-mode 'Info-mode) Info-current-file) ((eq major-mode 'texinfo-mode) (save-excursion (goto-char (point-min)) (if (re-search-forward "^@setfilename[ ]+\\([^ \n]+\\)[ ]*" (line-beginning-position 100) t) (expand-file-name (match-string 1))))))) (prompt (if default-filename (format "Info file (%s): " default-filename) "Info file: "))) (read-file-name prompt nil default-filename t)))]) #@146 Check external references in all info documents in the usual path. The usual path is `Info-directory-list' and `Info-additional-directory-list'. (defalias 'info-xref-check-all #[nil "\300\301 !\207" [info-xref-check-list info-xref-all-info-files] 2 (#$ . 1295) nil]) #@322 Return a list of all available info files. Only top-level files are returned, subfiles are excluded. Since info files don't have to have a .info suffix, all files in the relevant directories are considered, which might mean a lot of extraneous things are returned if for instance a source code directory is in the path. (defalias 'info-xref-all-info-files #[nil "\302 \210\303\304\305\306\307 \"\"\"\207" [Info-directory-list Info-additional-directory-list info-initialize apply nconc mapcar #[(dir) "\304\305 \306\"\304\211\203' @\307\n!\204 \310\n!\204 \nB A\211\204 *\237)\207" [result dir name #1=#:--cl-dolist-temp-- nil directory-files t file-directory-p info-xref-subfile-p] 4] append] 7 (#$ . 1569)]) #@259 Return t if FILENAME is an info subfile. If removing the last "-" from the filename gives a file that exists, then consider FILENAME a subfile. This is an imperfect test, we probably should open up the purported top file and see what subfiles it says. (defalias 'info-xref-subfile-p #[(filename) "\301\302\"\205\303\304\305\"\304\306\"P!\207" [filename string-match "\\`\\(\\([^-]*-\\)*[^-]*\\)-[0-9]+\\(.*\\)\\'" file-exists-p match-string 1 3] 5 (#$ . 2299)]) #@63 Check external references in info documents in FILENAME-LIST. (defalias 'info-xref-check-list #[(filename-list) "\306\307\"\210\310 \210\311\211 \312\211\203\224 @\313\314\f\"\312!\"\313\315\f\"\312#$\316\216$\203:\317 #\320\321$\"\210\322\323!%\324\216r%q\210\325\f!\210eb\210\326\327\312\307#\203\210\330\f!&\331\332!\203\204\333\334!'\322\323!(\335\216r(q\210\325\336'&\"!\210\337 \210,\312y\210\202Z)\202\213\337 \210. A\211\204*\313\340\n #c*\207" [info-xref-results-buffer info-xref-bad info-xref-good filename-list info-xref-filename #1=#:--cl-dolist-temp-- pop-to-buffer t erase-buffer 0 nil format "In file %s:\n" "Looking at %s" ((byte-code "\203 \203\302\303 \"\210\202\302\304!\210\304\207" [#2=#:with-temp-message #3=#:current-message message "%s" nil] 3)) current-message message "%s" generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [#4=#:temp-buffer buffer-name kill-buffer] 2)) info-insert-file-contents re-search-forward "\nIndirect:\n" file-name-directory looking-at "\\(.*\\): [0-9]+\n" match-string 1 ((byte-code "\301!\203\n\302!\210\301\207" [#5=#:temp-buffer buffer-name kill-buffer] 2)) expand-file-name info-xref-check-buffer "done, %d good, %d bad\n" info-xref-xfile-alist info-xref-filename-heading #3# #2# #4# dir subfile #5#] 5 (#$ . 2778)]) #@122 Check external references in the info file in the current buffer. This should be the raw file contents, not `Info-mode'. (defalias 'info-xref-check-buffer #[nil "eb\210\306\307\310\311#\205b\312\313!\314\315\316\312\317!\311\211%\320\230\203'\321\322 \"\210\202^\323\n\"\204B\324! B\nB \204A\321\325\"\210)\323\n\"A\203^\324 !\203V\fT\202^ T\321\326 \"\210*\202\207" [file node info-xref-xfile-alist found info-xref-good info-xref-bad re-search-forward "\\*[Nn]ote[ \n ]+[^:]*:[ \n ]+\\(\\(([^)]*)\\)[^.,]+\\)[.,]" nil t match-string 2 replace-regexp-in-string "[ \n][ \n ]*\\| [ \n ]+" " " 1 "()" info-xref-output "Empty filename part: %s\n" assoc info-xref-goto-node-p "Not available to check: %s\n" "No such node: %s\n"] 6 (#$ . 4126)]) #@69 Emit a `format'-ed message STR+ARGS to the info-xref output buffer. (defalias 'info-xref-output #[(str &rest args) "rq\210 \304\305\n #\261\210\306\307\310!)\207" [info-xref-results-buffer info-xref-filename-heading str args apply format "" sit-for 0] 5 (#$ . 4894)]) #@52 Return t if it's possible to go to the given NODE. (defalias 'info-xref-goto-node-p #[(node) "p\212\301\213*\207" [oldbuf ((byte-code "\301\302\303\217p\232\204\304p!\210\207" [oldbuf err (byte-code "\301\302\303!\205\f\303q\210\304\"\210\305\207" [node Info-goto-node get-buffer "*info*" "xref - temporary" t] 4) ((error)) kill-buffer] 3))] 1 (#$ . 5171)]) #@309 Check info references in all customize groups and variables. `custom-manual' and `info-link' entries in the `custom-links' list are checked. `custom-load' autoloads for all symbols are loaded in order to get all the link information. This will be a lot of lisp packages loaded, and can take quite a while. (defalias 'info-xref-check-all-custom #[nil "\305\306\"\210\307 \210\310\311\312!\210\313\314!\210\313\315!\210\316\317\320!\210)\311\321!\210\322\211\317\323!\210\311\324\f #+\207" [info-xref-results-buffer info-xref-filename-heading viper-mode bad good pop-to-buffer t erase-buffer "" info-xref-output "Loading custom-load autoloads ...\n" require cus-start cus-load nil mapatoms #[(symbol) "\304N\305\211\2036\n@\2119\203\306\307\310\217\210\202/\311 \"\204/\311\312 ! \"\204/\306\313\314\217\210\nA\211\204\n*\305\207" [symbol load #1=#:--cl-dolist-temp-- load-history custom-loads nil cause (require load) ((error (info-xref-output "Symbol `%s': cannot require '%s: %s\n" symbol load cause))) assoc locate-library (load load) ((error (info-xref-output "Symbol `%s': cannot load \"%s\": %s\n" symbol load cause)))] 4] "\nChecking custom-links references ...\n" 0 #[(symbol) "\306N\307\211\203O\n@\211@\310>\203H \211A@)\311=\203& \211AA)\312 \211A@)!\2037\fT\202H T\313\314\315! \211A@)$\210\nA\211\204\n*\307\207" [symbol link #2=#:--cl-dolist-temp-- x good bad custom-links nil (custom-manual info-link) :tag info-xref-goto-node-p info-xref-output "Symbol `%s' (in %s): cannot goto node: %s\n" symbol-file] 6] "%d good, %d bad\n"] 4 (#$ . 5542) nil]) (provide 'info-xref)