info.elc 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. (provide (quote info))
  2. (defvar Info-history nil "\
  3. List of info nodes user has visited.
  4. Each element of list is a list (FILENAME NODENAME BUFFERPOS).")
  5. (defvar Info-enable-edit nil "\
  6. Non-nil means the \\[Info-edit] command in Info can edit the current node.")
  7. (defvar Info-enable-active-nodes t "\
  8. Non-nil allows Info to execute Lisp code associated with nodes.
  9. The Lisp code is executed when the node is selected.")
  10. (defvar Info-directory nil "\
  11. Default directory for Info documentation files.")
  12. (defvar Info-current-file nil "\
  13. Info file that Info is now looking at, or nil.")
  14. (defvar Info-current-subfile nil "\
  15. Info subfile that is actually in the *info* buffer now,
  16. or nil if current info file is not split into subfiles.")
  17. (defvar Info-current-node nil "\
  18. Name of node that Info is now looking at, or nil.")
  19. (defvar Info-tag-table-marker (make-marker) "\
  20. Marker pointing at beginning of current Info file's tag table.
  21. Marker points nowhere if file has no tag table.")
  22. (defun info nil "\
  23. Create a buffer for Info, the documentation browser program." (interactive) (byte-code "ÀˆÁÂ!ƒÃÂ!‚Ä ‡" [nil get-buffer "*info*" switch-to-buffer Info-directory] 4))
  24. (defun Info-find-node (filename nodename &optional no-going-back) (byte-code "…<ÈÕ!‰ˆÖ
  25. \"‰ˆ× !ƒ ‰‚;ÖØ!
  26. \"‰ˆ× !ƒ4 ‰‚;ÙÚÖ
  27. \"\")ˆ …C ?…O `E B‰ˆÛÜ!ˆÝ=†]Ý ˆÞ ˆÈ‰ˆßŽ?†ñà \"†ñÈ Èȉ
  28. ˆá ˆâË\"ˆãÈ!ˆä!‰ ˆå È\"ˆdbˆæç!ˆàè\"†ëéêÈË#?†ëÈëì!ˆ`‰ˆŠæí!ˆîï!)ƒäŠpðñ!qˆá ˆò!ˆå óô!\"))‚êå \")ˆ‰)ˆàè\"ƒ‰ˆõ ‚jeö !…FŠ÷ !qˆ bˆéøùQÈË#ƒ@úp!‰ˆpûÜ!=?…=ü!‰‚EÙý\")ˆeþZ]b)ˆÿ�@!�AQ�B�C�)ˆ�D )ˆeb‡" [filename temp Info-directory Info-current-file no-going-back Info-history Info-current-node major-mode nil buffer-read-only Info-current-subfile t default-directory Info-tag-table-marker nodename pos buf buffer-file-name guesspos regexp hist substitute-in-file-name expand-file-name file-exists-p downcase error "Info file %s does not exist" switch-to-buffer "*info*" Info-mode widen ((byte-code "† † @ A‰ˆÅÆ
  29. 8Ä#ˆÈ
  30. 8b)‡" [Info-current-node no-going-back hist Info-history t Info-find-node 0 1 2] 4)) equal erase-buffer insert-file-contents set-buffer-modified-p file-name-directory set-marker forward-line -8 "*" search-forward "
  31. End tag table
  32. " search-backward "
  33. Tag table:
  34. " 2 looking-at "(Indirect)
  35. " get-buffer-create " *info tag table*" insert-buffer-substring match-end 0 Info-set-mode-line marker-position marker-buffer "Node: " "" read get-buffer Info-read-subfile "No such node: \"%s\"" 1000 "Node: *" regexp-quote " *[,
  36. ]" foo (byte-code "ÅÆÀÁ#…#ÇÈ!ˆ`ÇÈ!ˆÉ
  37. Á#…ÊËÁ\")ˆ‚ˆÌÍ \"‡" [nil t beg regexp nodename search-forward "
  38. " forward-line 1 re-search-backward throw foo error "No such node: %s"] 8) Info-select-node] 42))
  39. (defun Info-read-subfile (nodepos) (byte-code "É!qˆebˆÊË!ˆÆÆ`ÌÍ!ˆÎÏ�ˆÐÑ!qˆÒ
  40. \"†?ÆƉˆÓ ˆÔ ˆÕ
  41. !ˆÖÆ!ˆ
  42. ‰)ˆ Z \\+‡" [Info-tag-table-marker lastfilepos lastfilename header-length Info-current-subfile buffer-read-only nil buffer-file-name nodepos marker-buffer search-forward "
  43. " forward-line 2 foo (byte-code "ÇÈ!?…8`ÉÉÊË!ˆÌ`ÍZ\"‰ˆÎp!‰ˆ V…*ÏÐÄ\"ˆ
  44. ‰ˆ ‰+ˆ‚‡" [beg thisfilepos thisfilename nodepos t lastfilename lastfilepos looking-at "" nil search-forward ": " buffer-substring 2 read throw foo] 8) get-buffer "*info*" equal widen erase-buffer insert-file-contents set-buffer-modified-p] 11))
  45. (defun Info-select-node nil (byte-code "ŠÅÆ!ˆÇÈ!ˆÉÊ!ˆË`ÌÍ!ˆ`\"‰ˆÎ ˆÏ ˆÂÐ`ÉÑÂÃ#ƒ@`SÒÓ!…<ÔÕ!bˆÖp!‰ˆ‚Ad\"ˆ …J× !))‡" [Info-current-node active-expression nil t Info-enable-active-nodes search-backward "
  46. " forward-line 2 re-search-forward "Node:[ ]*" buffer-substring skip-chars-forward "^,
  47. " Info-set-mode-line beginning-of-line narrow-to-region "
  48. [ ]" looking-at "[
  49.  ]*execute: " match-end 0 read eval] 16))
  50. (defun Info-set-mode-line nil (byte-code "Ã ƒ Ä !‚ ÅÆ
  51. †ÅR‰‡" [mode-line-buffer-identification Info-current-file Info-current-node "Info: (" file-name-nondirectory "" ")"] 5))
  52. (defun Info-goto-node (nodename) "\
  53. Go to info node named NAME. Give just NODENAME or (FILENAME)NODENAME." (interactive "sGoto node: ") (byte-code "ÈÃÄÅ \"ˆÆÇ!ÈÇ!UƒÉ‚ ÆÊ!ÈÊ!O ÆË!ÈË!O‰ˆÄÌ\"
  54. …:Í
  55. O‰)ˆÄÌ \"
  56. …K Í
  57. O‰)ˆÎÏÉ\"ƒYÂZÏ É\"ƒeЂf \")‡" [filename nodename trim nil string-match "\\s *\\((\\s *\\([^ )]*\\)\\s *)\\s *\\|\\)\\(.*\\)" match-beginning 1 match-end "" 2 3 "\\s *\\'" 0 Info-find-node equal "Top"] 15))
  58. (defvar Info-last-search nil "\
  59. Default regexp for Info S command to search for.")
  60. (defun Info-search (regexp) "\
  61. Search for REGEXP, starting from point, and select node it's found in." (interactive "sSearch (regexp): ") (byte-code "ÈÏÐ\"ƒ ‰‚‰ˆÃÃ` ŠŒÑ ˆ
  62. ?ƒ6Ò!ˆ`‰‚:ÓÔÕ�))ˆ
  63. ?…ïÖŽÃ × !qˆebˆØÙ!ˆŒÚ`ØÛ!ˆ`S\"ˆebˆØÜ
  64. ÝQ!ˆÞ ˆm?…™Òß!ˆàá!â\\bˆãp!äåá!àá!\"B B‰ ˆàæ!Tbˆ‚mˆç !  @@ A‰ )ˆ …Ýèé @A\"ˆê @@!ˆ A‰ ˆebˆÒÃÍ#…Ù`É ˆ‚­ˆ
  65. ƒèèÐ!‚íëìC\"))ˆÑ ˆ
  66. bˆí ˆÏ \"…Ï\"†  EB‰-‡" [regexp Info-last-search found nil current onode Info-current-node ofile Info-current-file opoint Info-current-subfile list Info-tag-table-marker t Info-history equal "" widen re-search-forward err (byte-code "Â!ˆ`‰‡" [regexp found re-search-forward] 3) ((search-failed (byte-code "À‡" [nil] 1))) ((byte-code "?… à !ˆ
  67. b‡" [found current opoint Info-read-subfile] 2)) marker-buffer search-forward "
  68. 
  69. Indirect:" narrow-to-region "
  70. " "
  71. " ": " beginning-of-line "\\(^.*\\): [0-9]+$" match-end 1 2 read buffer-substring match-beginning 0 nreverse message "Searching subfile %s..." Info-read-subfile signal search-failed Info-select-node] 29))
  72. (defun Info-extract-pointer (name &optional errorname) (byte-code "ŠebˆÄÅ!ˆÆÇPÁÂ#ƒÁ‚!ÈÉÊ †!P!ˆËÌ!bˆÍ )‡" [name nil t errorname forward-line 1 re-search-backward ":" error "Node has no " capitalize match-end 0 Info-following-node-name] 7))
  73. (defun Info-following-node-name (&optional allowedchars) (byte-code "ÁÂ!ˆÃ`Á† Ä!ˆÅÆ!ˆ`\"‡" [allowedchars skip-chars-forward " " buffer-substring "^,
  74. " skip-chars-backward " "] 6))
  75. (defun Info-next nil "\
  76. Go to the next node of this node." (interactive) (byte-code "ÀˆÁÂÃ!!‡" [nil Info-goto-node Info-extract-pointer "next"] 3))
  77. (defun Info-prev nil "\
  78. Go to the previous node of this node." (interactive) (byte-code "ÀˆÁÂÃÄ\"!‡" [nil Info-goto-node Info-extract-pointer "prev[ious]*" "previous"] 4))
  79. (defun Info-up nil "\
  80. Go to the superior node of this node." (interactive) (byte-code "ÀˆÁÂÃ!!‡" [nil Info-goto-node Info-extract-pointer "up"] 3))
  81. (defun Info-last nil "\
  82. Go back to the last node visited." (interactive) (byte-code "Ĉ† ÅÆ!ˆÄÄÄ@@‰ˆ@A@‰ˆ@AA@‰ˆA‰ˆÇ
  83. \"ˆA‰ˆ b+‡" [Info-history filename nodename opoint nil error "This is the first Info node you looked at" Info-find-node] 4))
  84. (defun Info-directory nil "\
  85. Go to the Info directory node." (interactive) (byte-code "ÀˆÁÂÃ\"‡" [nil Info-find-node "dir" "top"] 3))
  86. (defun Info-follow-reference (footnotename) "\
  87. Follow cross reference named NAME to the node it refers to.
  88. NAME may be an abbreviation of the reference name." (interactive (byte-code "ÁÅÅÅŠebˆÆÇÅÁ#…_ÈÉÊ!Ë\\`S\"‰ˆÊ‰ˆÌÍ #‰…6 ÎIˆ‚$ˆÌÏ #‰…S Ê TO ÐÊ!ÅOP‰ˆ‚7ˆ ÅB
  89. B‰ˆ‚ )ˆ
  90. ƒoÑÒ
  91. ÅÁ$C‚rÓÔ!,‡" [completion-ignore-case t completions str i nil re-search-forward "\\*note[
  92. ]*[^: ]*:" buffer-substring match-beginning 0 6 string-match "
  93. " 32 " +" match-end completing-read "Follow reference named: " error "No cross-references in this node"] 12)) (byte-code "ňÅÅÅÉPÊË #‰…0 Ì OÍ TÅOQ‰ˆ Î\\‰ˆ‚ˆŠebˆÏ ÅÁ#†BÐÑ\"ˆÒÌ!Î\\bˆÓÔ!‰)ˆÕ!,‡" [completion-ignore-case t completions str i nil target beg footnotename "\\*note " string-match " " 0 "[
  94. ]*" 5 re-search-forward error "No cross-reference named %s" match-beginning Info-extract-menu-node-name "Bad format cross reference" Info-goto-node] 7))
  95. (defun Info-extract-menu-node-name (&optional errmessage) (byte-code "ÃÄ!ˆ`ÅÅÃÆ!ˆÇÈ!ˆÉÊ!ƒ Ë`S\"‚#ÌÍ!‰ˆÎÏ
  96. #‰…8
  97. ÐIˆ‚&ˆ +‡" [beg str i skip-chars-forward "
  98. " nil "^:" forward-char 1 looking-at ":" buffer-substring Info-following-node-name "^.,
  99. " string-match "
  100. " 32] 11))
  101. (defun Info-menu-item-sequence (list) (byte-code "…Á@!ˆA‰ˆ‚‡" [list Info-menu-item] 4))
  102. (defun Info-menu (menu-item) "\
  103. Go to node for menu item named (or abbreviated) NAME." (interactive (byte-code "ÊebˆÄÅÃÂ#?…ÆÇ!ˆÈÉÃÂ#…1ÊËÌ!ÍÌ!\"ËÌ!BB‰ˆ‚)ˆÎÏÃÂ$C*‡" [completions completion-ignore-case t nil search-forward "
  104. * menu:" error "No menu in this node" re-search-forward "
  105. \\* \\([^:
  106. ]*\\):" buffer-substring match-beginning 1 match-end completing-read "Menu item: "] 12)) (byte-code "ÃˆÅÆ !!‡" [completions completion-ignore-case t nil menu-item Info-goto-node Info-extract-menu-item] 3))
  107. (defun Info-extract-menu-item (menu-item) (byte-code "ŠebˆÃÄÀÁ#†ÅÆ!ˆÃÇ
  108. PÀÁ#†ÅÈ!ˆÉ ˆÊË!ˆÌ )‡" [nil t menu-item search-forward "
  109. * menu:" error "No menu in this node" "
  110. * " "No such item in menu" beginning-of-line forward-char 2 Info-extract-menu-node-name] 8))
  111. (defun Info-extract-menu-counting (count) (byte-code "ŠebˆÃÄÀÁ#†ÅÆ!ˆÃÇÀÁ
  112. $†ÅÈ!ˆÉ )‡" [nil t count search-forward "
  113. * menu:" error "No menu in this node" "
  114. * " "Too few items in menu" Info-extract-menu-node-name] 7))
  115. (defun Info-first-menu-item nil "\
  116. Go to the node of the first menu item." (interactive) (byte-code "ÀˆÁÂÃ!!‡" [nil Info-goto-node Info-extract-menu-counting 1] 3))
  117. (defun Info-second-menu-item nil "\
  118. Go to the node of the second menu item." (interactive) (byte-code "ÀˆÁÂÃ!!‡" [nil Info-goto-node Info-extract-menu-counting 2] 3))
  119. (defun Info-third-menu-item nil "\
  120. Go to the node of the third menu item." (interactive) (byte-code "ÀˆÁÂÃ!!‡" [nil Info-goto-node Info-extract-menu-counting 3] 3))
  121. (defun Info-fourth-menu-item nil "\
  122. Go to the node of the fourth menu item." (interactive) (byte-code "ÀˆÁÂÃ!!‡" [nil Info-goto-node Info-extract-menu-counting 4] 3))
  123. (defun Info-fifth-menu-item nil "\
  124. Go to the node of the fifth menu item." (interactive) (byte-code "ÀˆÁÂÃ!!‡" [nil Info-goto-node Info-extract-menu-counting 5] 3))
  125. (defun Info-exit nil "\
  126. Exit Info by selecting some other buffer." (interactive) (byte-code "ÀˆÁÂp!Ãp!ˆ!‡" [nil switch-to-buffer other-buffer bury-buffer] 5))
  127. (defun Info-undefined nil "\
  128. Make command be undefined in Info." (interactive) (byte-code "ÀˆÁ ‡" [nil ding] 2))
  129. (defun Info-help nil "\
  130. Enter the Info tutorial." (interactive) (byte-code "ÀˆÁÂà ÄWƒÅ‚Æ\"‡" [nil Info-find-node "info" window-height 23 "Help-Small-Screen" "Help"] 5))
  131. (defun Info-summary nil "\
  132. Display a brief summary of all Info commands." (interactive) (byte-code "Èċ‡" [ch flag unread-command-char nil ((byte-code "ÄÅ!ˆÆ ˆÇÈ!cˆebˆÃÃÉd!?‰ˆÊ ƒ#Ë‚$Ì!ˆÍÎr‰\"ƒ7‰ˆÃ‚8 …AÏ ˆ‚*‡" [ch flag unread-command-char nil switch-to-buffer "*Help*" erase-buffer documentation Info-mode pos-visible-in-window-p message "Type Space to see more" "Type Space to return to Info" /= 32 scroll-up] 9))] 1))
  133. (defvar Info-mode-map nil "\
  134. Keymap containing Info commands.")
  135. (if Info-mode-map nil (setq Info-mode-map (make-keymap)) (suppress-keymap Info-mode-map) (define-key Info-mode-map "." (quote beginning-of-buffer)) (define-key Info-mode-map " " (quote scroll-up)) (define-key Info-mode-map "1" (quote Info-first-menu-item)) (define-key Info-mode-map "2" (quote Info-second-menu-item)) (define-key Info-mode-map "3" (quote Info-third-menu-item)) (define-key Info-mode-map "4" (quote Info-fourth-menu-item)) (define-key Info-mode-map "5" (quote Info-fifth-menu-item)) (define-key Info-mode-map "6" (quote undefined)) (define-key Info-mode-map "7" (quote undefined)) (define-key Info-mode-map "8" (quote undefined)) (define-key Info-mode-map "9" (quote undefined)) (define-key Info-mode-map "0" (quote undefined)) (define-key Info-mode-map "?" (quote Info-summary)) (define-key Info-mode-map "b" (quote beginning-of-buffer)) (define-key Info-mode-map "d" (quote Info-directory)) (define-key Info-mode-map "e" (quote Info-edit)) (define-key Info-mode-map "f" (quote Info-follow-reference)) (define-key Info-mode-map "g" (quote Info-goto-node)) (define-key Info-mode-map "h" (quote Info-help)) (define-key Info-mode-map "l" (quote Info-last)) (define-key Info-mode-map "m" (quote Info-menu)) (define-key Info-mode-map "n" (quote Info-next)) (define-key Info-mode-map "p" (quote Info-prev)) (define-key Info-mode-map "q" (quote Info-exit)) (define-key Info-mode-map "s" (quote Info-search)) (define-key Info-mode-map "u" (quote Info-up)) (define-key Info-mode-map "" (quote scroll-down)))
  136. (defun Info-mode nil "\
  137. Info mode provides commands for browsing through the Info documentation tree.
  138. Documentation in Info is divided into \"nodes\", each of which
  139. discusses one topic and contains references to other nodes
  140. which discuss related topics. Info has commands to follow
  141. the references and show you other nodes.
  142. h Invoke the Info tutorial.
  143. Selecting other nodes:
  144. n Move to the \"next\" node of this node.
  145. p Move to the \"previous\" node of this node.
  146. u Move \"up\" from this node.
  147. m Pick menu item specified by name (or abbreviation).
  148. Picking a menu item causes another node to be selected.
  149. f Follow a cross reference. Reads name of reference.
  150. l Move to the last node you were at.
  151. Moving within a node:
  152. Space scroll forward a page. DEL scroll backward.
  153. b Go to beginning of node.
  154. Advanced commands:
  155. q Quit Info: reselect previously selected buffer.
  156. e Edit contents of selected node.
  157. 1 Pick first item in node's menu.
  158. 2, 3, 4, 5 Pick second ... fifth item in node's menu.
  159. g Move to node specified by name.
  160. You may include a filename as well, as (FILENAME)NODENAME.
  161. s Search through this Info file for specified regexp,
  162. and select the node in which the next occurrence is found." (byte-code "É ˆÊ‰ˆË‰ˆÌ
  163. !ˆÍ !ˆ ‰ˆÇ‰ˆÇ‰ˆÎÏ!ˆÎÐ!ˆÎÑ!ˆÎÒ!ˆÎÓ!ˆÔ ‡" [major-mode mode-name Info-mode-map text-mode-syntax-table local-abbrev-table text-mode-abbrev-table case-fold-search t buffer-read-only kill-all-local-variables Info-mode "Info" use-local-map set-syntax-table make-local-variable Info-current-file Info-current-subfile Info-current-node Info-tag-table-marker Info-history Info-set-mode-line] 10))
  164. (defvar Info-edit-map nil "\
  165. Local keymap used within `e' command of Info.")
  166. (if Info-edit-map nil (setq Info-edit-map (copy-keymap text-mode-map)) (define-key Info-edit-map "" (quote Info-cease-edit)))
  167. (defun Info-edit-mode nil "\
  168. Major mode for editing the contents of an Info node.
  169. Like text mode with the addition of Info-cease-edit
  170. which returns to Info mode for browsing.
  171. \\{Info-edit-map}" (byte-code "À‡" [nil] 1))
  172. (defun Info-edit nil "\
  173. Edit the contents of this Info node.
  174. Allowed only if variable Info-enable-edit is non-nil." (interactive) (byte-code "ň† ÆÇ!ˆÈ !ˆÉ‰ˆÊ‰ˆËÌ!ˆÅ‰ˆÍÎ !ˆÏÐÑ!!‡" [Info-enable-edit Info-edit-map major-mode mode-name buffer-read-only nil error "Editing info nodes is not enabled" use-local-map Info-edit-mode "Info Edit" kill-local-variable mode-line-buffer-identification set-buffer-modified-p buffer-modified-p message substitute-command-keys "Editing: Type \\[Info-cease-edit] to return to info"] 8))
  175. (defun Info-cease-edit nil "\
  176. Finish editing Info node; switch back to Info proper." (interactive) (byte-code "ÆˆÇ …ÈÉ!…Ê ˆË!ˆÌ‰ˆÍ‰ˆÎ ˆÄ‰ˆÏÇ !ˆÐ !…6Ç …6ÑÒ!‡" [Info-mode-map major-mode mode-name buffer-read-only t Info-tag-table-marker nil buffer-modified-p y-or-n-p "Save the file? " save-buffer use-local-map Info-mode "Info" Info-set-mode-line set-buffer-modified-p marker-position message "Tags may have changed. Use Info-tagify if necessary"] 11))