;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:20:55 2007 ;;; from file /home/cyd/emacs/lisp/informat.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 "`informat.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'info) #@72 Create or update Info file tag table in current buffer or in a region. (defalias 'Info-tagify #[(&optional input-buffer-name) "\203\f\306\307\"\210\202\306\310\311\312 !\"\210edd\313 TU`\314\216~\210eb\210\315\316\317\320#\2036\306\321!\210\202\376\317\211\320\322-./\323 \317\320#\203\231\324\325!\326\230\203\210\324\327!\330\230\203\\\320.\331\324\332!P\333\224D/B/.\320=\203\333\224\333\22501\334 \210*\202A\333\224\333\225|\210\202A\335\336\337!P\340\224TD/B/\202Adb\210\341y\210\3172\315\342\317\320#\203\272`3\343\344!\210\345 \210`3|\210)db\210n\204\304\346 \210\347c\2104\350=\203\3245`\317\223\210/\237\211/\203\372/@@\351\261\210\352/@A@p\"\210\340c\210/A\211/\204\335\342c\210--\203\306\353\"\207\306\354\311\312 !\"\207" [input-buffer-name opoint nomax omax omin regexp message "Tagifying region in %s ..." "Tagifying %s ..." file-name-nondirectory buffer-file-name buffer-size ((byte-code "b\210 \n\203\304 T\202 d^}\207" [opoint omin nomax omax buffer-size] 3)) search-forward "\nIndirect:\n" nil t "Cannot tagify split info file. Run this before splitting." "\\(\\(@anchor\\)\\(-no\\|-yes\\)\\(-refill\\)\\({\\)\\([^}]+\\)\\(}\\)\\|\\(\n\\(\f\\)?\\)\\(\n\\(File:[ ]*\\([^,\n ]*\\)[, \n]+[ \n]*\\)?Node:[ ]*\\([^,\n ]*\\)[, \n]\\)\\)" re-search-forward match-string 2 "@anchor" 3 "-yes" "Ref: " 6 0 texinfo-format-refill "Node: " match-string-no-properties 13 10 -8 "\nEnd tag table\n" search-backward "\nTag table:\n" beginning-of-line newline "\f\nTag table:\n" info-mode 127 princ "Tagifying region in %s done" "Tagifying %s done" case-fold-search refillp tag-list texinfo-command-end texinfo-command-start buffer-read-only end major-mode Info-tag-table-marker] 5 (#$ . 579) nil]) #@590 Split an info file into an indirect file plus bounded-size subfiles. Each subfile will be up to 50,000 characters plus one node. To use this command, first visit a large Info file that has a tag table. The buffer is modified into a (small) indirect info file which should be saved in place of the original visited file. The subfiles are written in the same directory the original file is in, with names generated by appending `-' and a number to the original file name. The indirect file still functions as an Info file, but it contains just the tag table and a directory of subfiles. (defalias 'Info-split #[nil "\306 \307W\203 \310\311!\210eb\210\312\313!\210\314u\210`\315\316\317\320\321!&db\210\322y\210\316'\312\323\316\320#\2049\310\324!\210\325\326!\210\327\330!\203G\310\331!\210\332 \210\317u\210\214e`}\210eb\210`TdW\203\241`\333\\d^b\210\312\313\316\334#\210& \\\335 !\336\337 \"PD\fB\340c\210\341e` \336\337 \"P#\210`S`|\210\314u\210 `&Z\\&`|\210 T\202U)\f\203\300&b\210\f@A@\336\342\f@@S\"\340\261\210\fA\211\204\246&b\210\343c\210\312\344!\210\345c.\207" [buffer-file-name filename case-fold-search subfile-number subfiles chars-deleted buffer-size 70000 error "This is too small to be worth splitting" search-forward "" -1 0 nil 1 t file-name-sans-versions -8 "\nEnd tag table\n" "Tag table required; use M-x Info-tagify" search-backward "\nTag table:\n" looking-at "\nTag table:\n" "Tag table is just a skeleton; use M-x Info-tagify" beginning-of-line 50000 move file-name-nondirectory format "-%d" "\n" write-region ": %d" "\nIndirect:\n" "\nTag Table:\n" "(Indirect)\n" start buffer-read-only] 8 (#$ . 2350) nil]) #@110 Check current buffer for validity as an Info file. Check that every node pointer points to an existing node. (defalias 'Info-validate #[nil "\212\214~\210eb\210\306\307\310\311#\203\312\313\314p!\"\210eb\210\315\316\311\310\211\306\317\310\311#\203|\320y\210`\320y\210\321 \311#\203x\322\320\224\320\225b\210\323\310x\210`\"\227@\324@\f\"\203^@\325\310EB\202w@\310\210\321\326 \311#\205r\327\225b\210\330 \227 E\fB))\202#eb\210\306\317\310\311#\203\222\320y\210`\310\211AB\320y\210\321 \311#\203\216\214\331 C\306\317\310\332#\210 `}\210\333C!\210)\322\320\224\320\225b\210\323\310x\210`\"\227B\310\210\334\335\310\311#\203#\336\337!\211A\203#\324A\f\"\203#\324A\f\"A@B\232\203\211D\203D@A@\340\232\203 D@@A\232\203 \341D@\"DA\211D\204\362)\202#A\340BEB\310\210\321\326\310\311#\2032\336\342!\210\310\210\334\343\310\311#\203A\336\344!\210\345\346\310\311#\203d\345\347\310\311#\203d\336\350`\212\351\310w\210`){P\352 \"\210\202Ieb\210\345\353\310\311#\203\215\327\224\354\\b\210\355\310w\210\336\356`\212\351\310w\210`){P\352\357!\"\210\202g)+\202\360 ?\204\236 \203\361\220\203\362\363!\210\362@@!\210\362\364!\210@A@D\365\366D\"\203\320\362D\327\211\224O!\210\362\367!\210\202\325\362D!\210)\370@8\203\362\371!\210\370@8D\365\366D\"\203\377\362D\327\211\224O!\210\362\367!\210\202\362D!\210)\372 \210A\211\204\244 \205\362\373!\221\202,\212\374\361!\203(\361q\210\375p!\210)\376\377!.\207" [Info-validate-lossages tags-losing case-fold-search regexp Info-validate-allnodes beg search-forward "\nTag table:\n(Indirect)\n" nil t error "Don't yet know how to validate indirect info files: \"%s\"" buffer-name (("*")) "Node:[ ]*\\([^,\n ]*\\)[, \n]" "\n" 1 re-search-backward buffer-substring-no-properties " " assoc "Duplicate node-name" "prev[ious]*:" 0 Info-following-node-name match-data move set-match-data search-backward "next:" Info-validate-node-name "invalid Next" "should have Previous" delq "invalid Previous" "up:" "invalid Up" re-search-forward "\n* Menu:" "\n\\* " "invalid menu item " "^:" Info-extract-menu-node-name "\\*note[ \n]*[^: ]*:" 5 " \n" "invalid reference " "Bad format cross-reference" Info-validate-tags-table " *problems in info file*" princ "In node \"" "\", " string-match "\n" "..." 2 ": " terpri "\nTags table must be recomputed\n" get-buffer kill-buffer message "File appears valid" name next Info-validate-thisnode md tem] 6 (#$ . 4024) nil]) (defalias 'Info-validate-node-name #[(kind &optional name) "\204\305\225b\210\306\307w\210g\310U\204\311`\312\307w\210\313\307x\210`\"\203C\227\211G\305V\2035\305H\310U\204C\314 \"\204C\n E\fB\207" [name Info-validate-allnodes Info-validate-thisnode kind Info-validate-lossages 0 " " nil 40 buffer-substring-no-properties "^, \n" " " assoc] 5]) (defalias 'Info-validate-tags-table #[nil "eb\210\300\301\302\303#\204 \303\207\304\305\215?\207" [search-forward "\nEnd tag table\n" nil t losing (byte-code "\304\224\305\306!\210\304\225S\307 \211\2037 b\210\n@@\310\232\2040\311\312\n@@\313Q\314#\2040\315\316\317\"\210\nA\211\204 Tb\210\320\321!\203{\322\323\224\323\225\"\227\324\n \"\211\203p\325\326\224b\210\nAA@\327p!Z\211\304V\203j\n\202l\n[W\203u\315\316\330\"\210\323y\210\202;+\320\331!\203\205\323y\210\320\332!\204\220\315\316\333\"\210\307\207" [end start tem Info-validate-allnodes 0 search-backward "\nTag table:\n" nil "*" search-forward "Node: " "" t throw losing x looking-at ".*Node: \\(.*\\)\\([0-9]+\\)$" buffer-substring-no-properties 1 assoc 1000 2 read y "\n" "End tag table\n" z] 5)] 4]) #@268 Runs `Info-validate' on the files remaining on the command line. Must be used only with -batch, and kills Emacs on completion. Each file will be processed even if an error occurred previously. For example, invoke "emacs -batch -f batch-info-validate $info/ ~/*.info" (defalias 'batch-info-validate #[nil "\204\306\307!\210\310\311\211\312\211\313\311\211\203e\314@!\315!\204@\316\317\"\210\320A\211\202\321!\203U\322!A\244\211\202BA\211\204 \203\200@A\311\323\324\325\217\210)\202e\326!.\207" [noninteractive kept-new-versions kept-old-versions find-file-run-dired auto-save-default version-control error "batch-info-validate may only be used -batch" t nil 259259 0 expand-file-name file-exists-p message ">> %s does not exist!" 1 file-directory-p directory-files err (byte-code "\203\306p!\210\307 !\210\310p!\210\311\312!\210\313 \210\312db\210\314\315\312\316#\203,\317\320 \"\210\202=d\321W\203:\317\322 \"\210\202=\323 \210)\324\317\325 \"\210\326 !\203O\306 !\210\327 \210\326 !\203u\317\330!\210\317\331 \"\210\212 q\210\332\333ed\"!\210)\317\330!\210\334\316)\335 \203\207 \204\207\317\336 \"\210\337 \210\312\207" [buffer-file-name file case-fold-search loss-name error lose kill-buffer find-file buffer-disable-undo set-buffer-modified-p nil fundamental-mode search-backward "\n\f\nTag table:\n" t message "%s already tagified" 30000 "%s too small to bother tagifying" Info-tagify " *problems in info file*" "Checking validity of info file %s..." get-buffer Info-validate "----------------------------------------------------------------------" ">> PROBLEMS IN INFO FILE %s" princ buffer-substring-no-properties 1 buffer-modified-p "Saving modified %s" save-buffer] 4) ((error (byte-code "\301\302\303!\"\207" [err message ">> Error: %s" prin1-to-string] 4))) kill-emacs files file command-line-args-left lose] 6 (#$ . 7677)]) (provide 'informat)