home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / pcl / docs.lha / latexinfo / elisp / latexnfo-mde.elc < prev    next >
Encoding:
Text File  |  1992-02-26  |  18.6 KB  |  349 lines

  1.  
  2. (autoload (quote latexinfo-format-region) "latexinfo" "\
  3. Convert the current region of the Latexinfo file to Info format.
  4. This lets you see what that part of the file will look like in Info.
  5. The command is bound to \\[latexinfo-format-region].  The text that is
  6. converted to Info is stored in a temporary buffer." t nil)
  7.  
  8. (autoload (quote latexinfo-format-buffer) "latexinfo" "\
  9. Process the current buffer as latexinfo code, into an Info file.
  10. The Info file output is generated in a buffer visiting the Info file
  11. names specified in the \\setfilename command.
  12.  
  13. Non-nil argument (prefix, if interactive) means don't make tag table
  14. and don't split the file if large.  You can use Info-tagify and
  15. Info-split to do these manually." t nil)
  16.  
  17. (autoload (quote kill-compilation) "compile" "\
  18. Kill the process made by the \\[compile] command." t nil)
  19.  
  20. (autoload (quote latexinfo-latex-region) "latexnfo-tex" "\
  21. Run latex on the current region. 
  22.  
  23. A temporary file is written in the default directory, and LaTeX is run
  24. in that directory.  The first line of the file is copied to the
  25. temporary file; and if the buffer has a header, it is written to the
  26. temporary file before the region itself.  The buffer's header is all
  27. lines between the strings defined by latexinfo-start-of-header and
  28. latexinfo-end-of-header inclusive.  The header must start in the first 100
  29. lines.  The value of latexinfo-latex-trailer is appended to the temporary file
  30. after the region." t nil)
  31.  
  32. (autoload (quote latexinfo-latex-buffer) "latexnfo-tex" "\
  33. Run LaTeX on current buffer.
  34. After running LaTeX the first time, you may have to run \\[latexinfo-latexindex]
  35. and then \\[latexinfo-latex-buffer] again." t nil)
  36.  
  37. (autoload (quote latexinfo-kill-latex-job) "latexnfo-tex" "\
  38. Kill the currently running LaTeX job." t nil)
  39.  
  40. (autoload (quote latexinfo-recenter-latex-output-buffer) "latexnfo-tex" "\
  41. Redisplay buffer of LaTeX job output so that most recent output can be seen.
  42. The last line of the buffer is displayed on
  43. line LINE of the window, or centered if LINE is nil." t nil)
  44.  
  45. (autoload (quote latexinfo-delete-from-latex-print-queue) "latexnfo-tex" "\
  46. Delete job from the line printer spooling queue.
  47. You are prompted for the job number (shown by a previous
  48. \\[latexinfo-show-latex-print-queue] command." t nil)
  49.  
  50. (autoload (quote latexinfo-show-latex-print-queue) "latexnfo-tex" "\
  51. Show the print queue that \\[latexinfo-latex-print] put your job on.
  52. Runs the shell command defined by latexinfo-show-latex-queue-command." t nil)
  53.  
  54. (autoload (quote latexinfo-latex-print) "latexnfo-tex" "\
  55. Print .dvi file made by \\[latexinfo-latex-region] or \\[latexinfo-latex-buffer].
  56. Runs the shell command defined by latexinfo-latex-dvi-print-command." t nil)
  57.  
  58. (autoload (quote latexinfo-latexindex) "latexnfo-tex" "\
  59. Run latexindex on unsorted index files.
  60. The index files are made by \\[latexinfo-latex-region] or \\[latexinfo-latex-buffer].
  61. Runs the shell command defined by latexinfo-latexindex-command." t nil)
  62.  
  63. (autoload (quote latexinfo-make-menu) "latexnfo-upd" "\
  64. Without any prefix argument, make or update a menu.
  65. Make the menu for the section enclosing the node found following point.
  66.  
  67. Non-nil argument (prefix, if interactive) means make or update menus
  68. for nodes within or part of the marked region.
  69.  
  70. Whenever a menu exists, and is being updated, the descriptions that
  71. are associated with node names in the pre-existing menu are
  72. incorporated into the new menu.  Otherwise, the nodes' section titles
  73. are inserted as descriptions." t nil)
  74.  
  75. (autoload (quote latexinfo-update-node) "latexnfo-upd" "\
  76. Without any prefix argument, update the node in which point is located.
  77. Non-nil argument (prefix, if interactive) means update the nodes in the
  78. marked region.
  79.  
  80. The functions for creating or updating nodes and menus, and their
  81. keybindings, are:
  82.  
  83.     latexinfo-update-node (&optional region-p)    \\[latexinfo-update-node]
  84.     latexinfo-every-node-update ()                \\[latexinfo-every-node-update]
  85.     latexinfo-sequential-node-update (&optional region-p)
  86.  
  87.     latexinfo-make-menu (&optional region-p)      \\[latexinfo-make-menu]
  88.     latexinfo-all-menus-update ()                 \\[latexinfo-all-menus-update]
  89.     latexinfo-master-menu ()
  90.  
  91.     latexinfo-indent-menu-description (column &optional region-p)
  92.  
  93. The `latexinfo-column-for-description' variable specifies the column to
  94. which menu descriptions are indented. Its default value is 24." t nil)
  95.  
  96. (autoload (quote latexinfo-every-node-update) "latexnfo-upd" "\
  97. Update every node in a Latexinfo file." t nil)
  98.  
  99. (autoload (quote latexinfo-all-menus-update) "latexnfo-upd" "\
  100. Update every regular menu in a Latexinfo file.
  101. Remove pre-existing master menu, if there is one.
  102.  
  103. If called with a non-nil argument, this function first updates all the
  104. nodes in the buffer before updating the menus." t nil)
  105.  
  106. (autoload (quote latexinfo-master-menu) "latexnfo-upd" "\
  107. Make a master menu for a whole Latexinfo file.
  108. Non-nil argument (prefix, if interactive) means first update all
  109. existing nodes and menus.  Remove pre-existing master menu, if there is one.
  110.  
  111. This function creates a master menu that follows the top node.  The
  112. master menu includes every entry from all the other menus.  It
  113. replaces any existing ordinary menu that follows the top node.
  114.  
  115. If called with a non-nil argument, this function first updates all the
  116. menus in the buffer (incorporating descriptions from pre-existing
  117. menus) before it constructs the master menu.
  118.  
  119. The function removes the detailed part of an already existing master
  120. menu.  This action depends on the pre-exisitng master menu using the
  121. standard `latexinfo-master-menu-header'.
  122.  
  123. The master menu has the following format, which is adapted from the
  124. recommendation in the Latexinfo Manual:
  125.  
  126.    * The first part contains the major nodes in the Latexinfo file: the
  127.      nodes for the chapters, chapter-like sections, and the major
  128.      appendices.  This includes the indices, so long as they are in
  129.      chapter-like sections, such as chapter* sections.
  130.  
  131.    * The second and subsequent parts contain a listing of the other,
  132.      lower level menus, in order.  This way, an inquirer can go
  133.      directly to a particular node if he or she is searching for
  134.      specific information.
  135.  
  136. Each of the menus in the detailed node listing is introduced by the
  137. title of the section containing the menu." t nil)
  138.  
  139. (autoload (quote latexinfo-indent-menu-description) "latexnfo-upd" "\
  140. Indent every description in menu following point to COLUMN.  
  141. Non-nil argument (prefix, if interactive) means indent every
  142. description in every menu in the region.  Does not indent second and
  143. subsequent lines of a multi-line description." t nil)
  144.  
  145. (autoload (quote latexinfo-sequential-node-update) "latexnfo-upd" "\
  146. Update one node (or many) in a Latexinfo file with sequential pointers.
  147.  
  148. This function causes the `Next' or `Previous' pointer to point to the
  149. immediately preceding or following node, even if it is at a higher or
  150. lower hierarchical level in the document.  Continually pressing `n' or
  151. `p' takes you straight through the file.
  152.  
  153. Without any prefix argument, update the node in which point is located.
  154. Non-nil argument (prefix, if interactive) means update the nodes in the
  155. marked region.
  156.  
  157. This command makes it awkward to navigate among sections and
  158. subsections; it should be used only for those documents that are meant
  159. to be read like a novel rather than a reference, and for which the
  160. Info `g*' command is inadequate." t nil)
  161.  
  162. (autoload (quote latexinfo-insert-node-lines) "latexnfo-upd" "\
  163. Insert missing `\\node' lines in region of Latexinfo file.
  164. Non-nil argument (prefix, if interactive) means also to insert the
  165. section titles as node names; and also to insert the section titles as
  166. node names in pre-existing \\node lines that lack names." t nil)
  167.  
  168. (autoload (quote latexinfo-multiple-files-update) "latexnfo-upd" "\
  169. Update first node pointers in each file included in OUTER-FILE;
  170. create or update main menu in the outer file that refers to such nodes. 
  171. This does not create or update menus or pointers within the included files.
  172.  
  173. With optional MAKE-MASTER-MENU argument (prefix arg, if interactive),
  174. insert a master menu in OUTER-FILE.  This does not create or update
  175. menus or pointers within the included files.
  176.  
  177. With optional UPDATE-EVERYTHING argument (numeric prefix arg, if
  178. interactive), update all the menus and all the `Next', `Previous', and
  179. `Up' pointers of all the files included in OUTER-FILE before inserting
  180. a master menu in OUTER-FILE.
  181.  
  182. The command also updates the `Top' level node pointers of OUTER-FILE.
  183.  
  184. Notes: 
  185.  
  186.   * this command does NOT save any files--you must save the
  187.     outer file and any modified, included files.
  188.  
  189.   * except for the `Top' node, this command does NOT handle any
  190.     pre-existing nodes in the outer file; hence, indices must be
  191.     enclosed in an included file.
  192.  
  193. Requirements:
  194.  
  195.   * each of the included files must contain exactly one highest
  196.     hierarchical level node, 
  197.   * this highest node must be the first node in the included file,
  198.   * each highest hierarchical level node must be of the same type.
  199.  
  200. Thus, normally, each included file contains one, and only one,
  201. chapter." t nil)
  202.  
  203. (defvar latexinfo-mode-syntax-table nil)
  204.  
  205. (if latexinfo-mode-syntax-table nil (setq latexinfo-mode-syntax-table (make-syntax-table)) (modify-syntax-entry 34 " " latexinfo-mode-syntax-table) (modify-syntax-entry 64 "w" latexinfo-mode-syntax-table) (modify-syntax-entry 92 "\\" latexinfo-mode-syntax-table) (modify-syntax-entry 17 "\\" latexinfo-mode-syntax-table) (modify-syntax-entry 91 "(]" latexinfo-mode-syntax-table) (modify-syntax-entry 93 ")[" latexinfo-mode-syntax-table) (modify-syntax-entry 123 "(}" latexinfo-mode-syntax-table) (modify-syntax-entry 125 "){" latexinfo-mode-syntax-table) (modify-syntax-entry 36 "w" latexinfo-mode-syntax-table) (modify-syntax-entry 39 "w" latexinfo-mode-syntax-table))
  206.  
  207. (defvar latexinfo-mode-map nil)
  208.  
  209. (defun latexinfo-define-common-keys (keymap) "\
  210. Define the keys both in Latexinfo mode and in the latexinfo-latex-shell." (byte-code "┴┬├#ê┴─┼#ê┴╞╟#ê┴╚╔#ê┴╩╦#ê┴╠═#ê┴╬╧#ê┴╨╤#ê┴╥╙#ç" [keymap define-key " " latexinfo-kill-latex-job "" latexinfo-quit-latex-job " " latexinfo-recenter-latex-output-buffer "" latexinfo-delete-from-latex-print-queue "" latexinfo-show-latex-print-queue "" latexinfo-latex-print "    " latexinfo-latexindex "" latexinfo-latex-region "" latexinfo-latex-buffer] 12))
  211.  
  212. (if latexinfo-mode-map nil (setq latexinfo-mode-map (make-sparse-keymap)) (latexinfo-define-common-keys latexinfo-mode-map) (define-key latexinfo-mode-map "" (quote latexinfo-format-region)) (define-key latexinfo-mode-map "" (quote latexinfo-format-buffer)) (define-key latexinfo-mode-map "m" (quote latexinfo-master-menu)) (define-key latexinfo-mode-map "
  213. " (quote latexinfo-make-menu)) (define-key latexinfo-mode-map "" (quote latexinfo-update-node)) (define-key latexinfo-mode-map "" (quote latexinfo-every-node-update)) (define-key latexinfo-mode-map "" (quote latexinfo-all-menus-update)) (define-key latexinfo-mode-map "    " (quote latexinfo-insert-node-lines)) (define-key latexinfo-mode-map "" (quote latexinfo-multiple-files-update)) (define-key latexinfo-mode-map "" (quote latexinfo-indent-menu-description)) (define-key latexinfo-mode-map "" (quote latexinfo-sequential-node-update)) (define-key latexinfo-mode-map "" (quote latexinfo-show-structure)) (define-key latexinfo-mode-map "}" (quote up-list)) (define-key latexinfo-mode-map "{" (quote latexinfo-insert-braces)) (define-key latexinfo-mode-map "v" (quote latexinfo-insert-var)) (define-key latexinfo-mode-map "s" (quote latexinfo-insert-samp)) (define-key latexinfo-mode-map "o" (quote latexinfo-insert-noindent)) (define-key latexinfo-mode-map "n" (quote latexinfo-insert-node)) (define-key latexinfo-mode-map "k" (quote latexinfo-insert-kbd)) (define-key latexinfo-mode-map "i" (quote latexinfo-insert-item)) (define-key latexinfo-mode-map "x" (quote latexinfo-insert-example)) (define-key latexinfo-mode-map "e" (quote latexinfo-insert-end)) (define-key latexinfo-mode-map "d" (quote latexinfo-insert-dfn)) (define-key latexinfo-mode-map "c" (quote latexinfo-insert-code)))
  214.  
  215. (defvar latexinfo-chapter-level-regexp "chapter\\|chapter\\*\\|unnumbered" "\
  216. *Regexp matching chapter-level headings (but not the top node).")
  217.  
  218. (defun latexinfo-mode nil "\
  219. Major mode for editing Latexinfo files.
  220.  
  221.   It has these extra commands:
  222. \\{latexinfo-mode-map}
  223.  
  224.   These are files that are used as input for LaTeX to make printed manuals
  225. and also to be turned into Info files by \\[latexinfo-format-buffer].
  226. These files are written in a version of LaTeX input format.
  227.  
  228.   Editing commands are like text-mode except that the syntax table is
  229. set up so expression commands skip Latexinfo bracket groups.  To see
  230. what the Info version of a region of the Latexinfo file will look like,
  231. use \\[latexinfo-format-region].  This command runs Info on the current region
  232. of the Latexinfo file and formats it properly.
  233.  
  234.   You can show the structure of a Latexinfo file with \\[latexinfo-show-structure].
  235. This command shows the structure of a Latexinfo file by listing the
  236. lines with the commands for \\chapter, \\section, and the like.
  237. These lines are displayed in another window called the *Occur* window.
  238. In that window, you can position the cursor over one of the lines and
  239. use \\[occur-mode-goto-occurrence], to jump to the corresponding spot
  240. in the Latexinfo file.
  241.  
  242.   In addition, Latexinfo mode provides commands that insert various
  243. frequently used commands into the buffer.  You can use these
  244. commands to save keystrokes.  And you can insert balanced braces with
  245. \\[latexinfo-insert-braces] and later use the command \\[up-list] to
  246. move forward past the closing brace.
  247.  
  248. Also, Latexinfo mode provides functions for automatically creating or
  249. updating menus and node pointers.  These functions
  250.  
  251.   * insert the `Next', `Previous' and `Up' pointers of a node,
  252.   * insert or update the menu for a section, and
  253.   * create a master menu for a Latexinfo source file.
  254.  
  255. Here are the functions:
  256.  
  257.     latexinfo-update-node                \\[latexinfo-update-node]
  258.     latexinfo-every-node-update          \\[latexinfo-every-node-update]
  259.     latexinfo-sequential-node-update 
  260.  
  261.     latexinfo-make-menu                  \\[latexinfo-make-menu]
  262.     latexinfo-all-menus-update           \\[latexinfo-all-menus-update]
  263.     latexinfo-master-menu
  264.  
  265.     latexinfo-indent-menu-description (column &optional region-p)
  266.  
  267. The `latexinfo-column-for-description' variable specifies the column to
  268. which menu descriptions are indented. 
  269.  
  270. Passed an argument (a prefix argument, if interactive), the
  271. `latexinfo-update-node' and `latexinfo-make-menu' functions do their jobs
  272. in the region.
  273.  
  274. To use the updating commands, you must structure your Latexinfo file
  275. hierarchically, such that each `\\node' line, with the exception of the
  276. Top node, is accompanied by some kind of section line, such as an
  277. `\\chapter' or `\\section' line.
  278.  
  279. If the file has a `top' node, it must be called `top' or `Top' and
  280. be the first node in the file.
  281.  
  282. Entering Latexinfo mode calls the value of text-mode-hook, and then the
  283. value of latexinfo-mode-hook." (interactive) (byte-code "╔ê╥ ê╙ëê╘ëê╒
  284. !ê╓ !ê╫─!ê╪
  285. ┘Qëê╫╞!ê╟ëê╫╚!ê╔ëê╫╩!ê┌
  286. Pë
  287. ê╫╦!ê┌ Pë ê╫╠!ê█ë ê╫═!ê▄ë
  288. ê╫╬!ê▌ëê╫╧!ê╟ëê╫╨!ê▐ëê╫╤!ê▀ëêαßΓ\"ç" [mode-name major-mode latexinfo-mode-map latexinfo-mode-syntax-table page-delimiter latexinfo-chapter-level-regexp require-final-newline t indent-tabs-mode nil paragraph-separate paragraph-start fill-column comment-start comment-start-skip words-include-escapes latexinfo-start-of-header latexinfo-end-of-header text-mode "Latexinfo" latexinfo-mode use-local-map set-syntax-table make-local-variable "^\\\\node [     ]*[Tt]op\\\\|^\\\\\\(" "\\)" "^\\|^\\\\[a-zA-Z{}]*[ 
  289. ]\\|" 72 "\\c " "\\\\c +" "\\documentstyle" "\\setfilename" run-hooks text-mode-hook latexinfo-mode-hook] 17))
  290.  
  291. (defvar latexinfo-start-of-header "\\documentstyle" "\
  292. String to mark start of header for latexinfo-latex-region.")
  293.  
  294. (defvar latexinfo-end-of-header "\\begin{document}" "\
  295. String to mark end of header for latexinfo-latex-region.")
  296.  
  297. (defun latexinfo-insert-var nil "\
  298. Insert the string \\var{} in a latexinfo buffer." (interactive) (byte-code "└ê┴cê┬ ç" [nil "\\var{}" backward-char] 2))
  299.  
  300. (defun latexinfo-insert-samp nil "\
  301. Insert the string \\samp{} in a latexinfo buffer." (interactive) (byte-code "└ê┴cê┬ ç" [nil "\\samp{}" backward-char] 2))
  302.  
  303. (defun latexinfo-insert-noindent nil "\
  304. Insert the string \\noindent in a latexinfo buffer." (interactive) (byte-code "└ê┴cç" [nil "\\noindent
  305. "] 1))
  306.  
  307. (defun latexinfo-insert-node nil "\
  308. Insert the string \\node in a latexinfo buffer, 
  309. along with a comment indicating the arguments to \\node." (interactive) (byte-code "└ê┴cê┬├!ê─┼!ç" [nil "\\node     
  310. \\comment  node-name,  next,  previous,  up" forward-line -1 forward-char 6] 3))
  311.  
  312. (defun latexinfo-insert-kbd nil "\
  313. Insert the string \\kbd in a latexinfo buffer." (interactive) (byte-code "└ê┴cê┬ ç" [nil "\\kbd{}" backward-char] 2))
  314.  
  315. (defun latexinfo-insert-item nil "\
  316. Insert the string \\item in a latexinfo buffer." (interactive) (byte-code "└ê┴cê┬ ç" [nil "\\item" newline] 2))
  317.  
  318. (defun latexinfo-insert-example nil "\
  319. Insert the string \\begin{example} in a latexinfo buffer." (interactive) (byte-code "└ê┴cê┬├!ç" [nil "\\begin{example}
  320. \\begin{example}
  321. " forward-line -2] 2))
  322.  
  323. (defun latexinfo-insert-end nil "\
  324. Insert the string `\\end{}' in a latexinfo buffer." (interactive) (byte-code "└ê┴cç" [nil "\\end{}"] 1))
  325.  
  326. (defun latexinfo-insert-dfn nil "\
  327. Insert the string \\dfn{} in a latexinfo buffer." (interactive) (byte-code "└ê┴cê┬ ç" [nil "\\dfn{}" backward-char] 2))
  328.  
  329. (defun latexinfo-insert-code nil "\
  330. Insert the string \\code{} in a latexinfo buffer." (interactive) (byte-code "└ê┴cê┬ ç" [nil "\\code{}" backward-char] 2))
  331.  
  332. (defun latexinfo-insert-braces nil "\
  333. Make a pair of braces and be poised to type inside of them.
  334. Use \\[up-list] to move forward out of the braces." (interactive) (byte-code "└ê┴cê┬ ç" [nil "{}" backward-char] 2))
  335.  
  336. (defun latexinfo-show-structure (&optional nodes-too) "\
  337. Show the structure of a Latexinfo file.
  338. List the lines in the file that begin with the commands for
  339. \\chapter, \\section, and the like.
  340.  
  341. With optional argument (prefix if interactive), list both the lines
  342. with commands for \\chapter, \\section, and the like, and list
  343. \\node lines.
  344.  
  345. Lines with structuring commands beginning in them are displayed in
  346. another window called the *Occur* window.  In that window, you can
  347. position the cursor over one of the lines and use
  348. \\[occur-mode-goto-occurrence], 
  349. to jump to the corresponding spot in the Latexinfo file." (interactive "P") (byte-code "┬ê├─!?à ┼╞!êèebêâ╟╚    P!é ╟    !)ê╔╩!êebê╦╠!ç" [nodes-too latexinfo-section-types-regexp nil fboundp latexinfo-make-menu load "latexnfo-upd" occur "\\(^\\\\node\\)\\|" pop-to-buffer "*Occur*" flush-lines "-----"] 7))
  350.  
  351. (provide (quote latexnfo-mde))
  352.