1 ;;; tex-info.el --- Support for editing Texinfo source.
3 ;; Copyright (C) 1993, 1994, 1997, 2000, 2001, 2004, 2005, 2006, 2011
4 ;; Free Software Foundation, Inc.
6 ;; Maintainer: auctex-devel@gnu.org
9 ;; This file is part of AUCTeX.
11 ;; AUCTeX is free software; you can redistribute it and/or modify it
12 ;; under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 3, or (at your option)
16 ;; AUCTeX is distributed in the hope that it will be useful, but
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ;; General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with AUCTeX; see the file COPYING. If not, write to the Free
23 ;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
31 ;; Make sure the Texinfo mode of AUCTeX is still used after loading
32 ;; texinfo.el. (This is only an issue on Emacs 21.)
33 (when (and (boundp 'TeX-modes)
34 (memq 'texinfo-mode TeX-modes))
35 (defalias 'texinfo-mode 'TeX-texinfo-mode))
39 (defvar Texinfo-environment-list
40 '(("cartouche") ("command") ("copying") ("defcv") ("deffn") ("defivar")
41 ("defmac") ("defmethod") ("defop") ("defopt") ("defspec")
42 ("deftp") ("deftypefn") ("deftypefun") ("deftypevar") ("deftypevr")
43 ("defun") ("defvar") ("defvr") ("description") ("detailmenu")
44 ("direntry") ("display") ("documentdescription") ("enumerate")
45 ("example") ("flushleft") ("flushright") ("format") ("ftable")
46 ("group") ("ifclear") ("ifdocbook") ("ifhtml") ("ifinfo")
47 ("ifnotdocbook") ("ifnothtml") ("ifnotinfo") ("ifnotplaintext")
48 ("ifnottex") ("ifnotxml") ("ifplaintext") ("ifset") ("iftex")
49 ("ifxml") ("ignore") ("itemize") ("lisp") ("macro") ("menu")
50 ("multitable") ("quotation") ("smalldisplay") ("smallexample")
51 ("smallformat") ("smalllisp") ("table") ("tex") ("titlepage")
52 ("verbatim") ("vtable"))
53 "Alist of Texinfo environments.")
55 (defconst texinfo-environment-regexp
56 ;; Overwrite version from `texinfo.el'.
58 (mapconcat 'car Texinfo-environment-list "\\|")
60 "Regexp for environment-like Texinfo list commands.
61 Subexpression 1 is what goes into the corresponding `@end' statement.")
63 (defun Texinfo-environment (env &optional arg)
64 "Make Texinfo environment ENV.
65 With optional ARG, modify current environment."
66 ;; XXX: This could be enhanced to act like `LaTeX-environment',
67 ;; i.e. suggest a default environment and have its own history.
68 (interactive (list (completing-read "Environment: "
69 Texinfo-environment-list)
72 (Texinfo-modify-environment env)
73 (Texinfo-insert-environment env)))
75 (defun Texinfo-insert-environment (env)
76 "Insert Texinfo environment ENV."
77 (if (and (TeX-active-mark)
78 (not (eq (mark) (point))))
80 (when (< (mark) (point))
81 (exchange-point-and-mark))
82 (unless (TeX-looking-at-backward "^[ \t]*")
87 (unless (TeX-looking-at-backward "^[ \t]*")
90 (save-excursion (newline))
92 (insert "@" env "\n\n@end " env "\n")
93 (if (null (cdr-safe (assoc "defcv" Texinfo-environment-list)))
96 (defun Texinfo-modify-environment (env)
97 "Change current environment to environment ENV."
99 (Texinfo-find-env-end)
100 (re-search-backward (concat (regexp-quote TeX-esc) "end \\([a-zA-Z]*\\)")
101 (line-beginning-position))
102 (replace-match env t t nil 1)
104 (Texinfo-find-env-start)
105 (re-search-forward (concat (regexp-quote TeX-esc) "\\([a-zA-Z]*\\)")
107 (replace-match env t t nil 1)))
109 (defun Texinfo-find-env-end ()
110 "Move point to the end of the current environment."
112 (let* ((envs (mapcar 'car Texinfo-environment-list))
113 (regexp (concat "^[ \t]*" (regexp-quote TeX-esc) "\\(end \\)*"
114 (regexp-opt envs t) "\\b"))
122 ;; Stop if point is inside of an @end <env> command, but not
123 ;; if it is behind it.
124 (when (and (looking-at regexp)
126 (> (match-end 0) orig-pos))
128 (while (and (> level 0) (re-search-forward regexp nil t))
130 (setq level (1- level))
131 (setq level (1+ level)))))
133 (goto-char (match-end 0))
134 (error "Can't locate end of current environment")))))
136 (defun Texinfo-find-env-start ()
137 "Move point to the start of the current environment."
139 (let* ((envs (mapcar 'car Texinfo-environment-list))
140 (regexp (concat "^[ \t]*\\(" (regexp-quote TeX-esc) "\\)\\(end \\)*"
141 (regexp-opt envs t) "\\b"))
149 ;; Stop if point is inside of an @<env> command, but not if
151 (when (and (looking-at regexp)
152 (not (match-string 2))
153 (< (match-beginning 1) orig-pos))
155 (while (and (> level 0) (re-search-backward regexp nil t))
157 (setq level (1+ level))
158 (setq level (1- level)))))
160 (goto-char (match-beginning 0))
161 (error "Can't locate start of current environment")))))
163 (defun Texinfo-mark-environment (&optional count)
164 "Set mark to end of current environment and point to the matching begin.
165 If prefix argument COUNT is given, mark the respective number of
166 enclosing environments. The command will not work properly if
167 there are unbalanced begin-end pairs in comments and verbatim
170 ;; This is identical to the LaTeX counterpart but for the find begin/end
171 ;; functions. So some day the implemenation should be factorized.
173 (setq count (if count (abs count) 1))
174 (let ((cur (point)) beg end)
175 ;; Only change point and mark after beginning and end were found.
176 ;; Point should not end up in the middle of nowhere if the search fails.
179 (Texinfo-find-env-end))
180 (setq end (line-beginning-position 2))
183 (Texinfo-find-env-start)
184 (unless (= (1+ c) count)
185 (beginning-of-line 0)))
189 (TeX-activate-region)))
191 (defun Texinfo-mark-section (&optional no-subsection)
192 "Mark current section, with inclusion of any containing node.
194 The current section is detected as starting by any of the
195 structuring commands matched by regexp in variable
196 `outline-regexp' which in turn is a regexp matching any element
197 of variable `texinfo-section-list'.
199 If optional argument NO-SUBSECTION is set to any integer or is a
200 non nil empty argument (i.e. `C-u \\[Texinfo-mark-section]'),
201 then mark the current section with exclusion of any subsections.
203 Otherwise, any included subsections are also marked along with
206 Note that when current section is starting immediatley after a
207 node commande, then the node command is also marked as part as
210 (let (beg end is-beg-section is-end-section
211 (section-re (concat "^\\s-*" outline-regexp)))
212 (if (and (consp no-subsection) (eq (car no-subsection) 4))
213 ;; section with exclusion of any subsection
214 (setq beg (save-excursion
215 (unless (looking-at section-re)
217 (re-search-backward section-re nil t))
222 (re-search-forward (concat section-re
223 "\\|^\\s-*@bye\\_>" ) nil t)
227 is-end-section (match-string 1))
228 ;; full section without exclusion of any subsection
229 (let (section-command-level)
233 (re-search-backward section-re nil t)))
235 (setq is-beg-section t
236 section-command-level
237 (cadr (assoc (match-string 1) texinfo-section-list))
242 (and (re-search-forward
243 (concat section-re "\\|^\\s-*@bye\\_>" ) nil t)
244 (or (null (setq is-end-section (match-string 1)))
245 (> (cadr (assoc is-end-section
246 texinfo-section-list))
247 section-command-level))))
248 (when (match-string 0)
250 (point))))))); (if ...)
252 ;; now take also enclosing node of beg and end
254 (boundary '(beg end))
255 (when (symbol-value (intern (concat "is-" (symbol-name boundary)
258 (goto-char (symbol-value boundary))
263 (beginning-of-line 0)
264 (looking-at "^\\s-*\\($\\|@\\(c\\|comment\\)\\_>\\)"))))
265 (when (looking-at "^\\s-*@node\\_>")
266 (set boundary (point))))))
270 (TeX-activate-region) )))
272 (defun Texinfo-mark-node ()
273 "Mark the current node. \
274 This is the node in which the pointer is. It is starting at
275 previous beginning of keyword `@node' and ending at next
276 beginning of keyword `@node' or `@bye'."
278 (let ((beg (save-excursion
279 (unless (looking-at "^\\s-*@\\(?:node\\)\\_>")
281 (re-search-backward "^\\s-*@\\(?:node\\)\\_>" nil t )))
284 (and (re-search-forward "^\\s-*@\\(?:node\\|bye\\)\\_>" nil t )
285 (progn (beginning-of-line) (point))))))
290 (TeX-activate-region) )))
292 (defun Texinfo-insert-node ()
293 "Insert a Texinfo node in the current buffer.
294 That means, insert the string `@node' and prompt for current,
295 next, previous and upper node. If there is an active region, use
296 this for the current node and inhibit the prompt for it. Insert
297 a comment on the following line indicating the order of arguments
300 (let ((active-mark (and (TeX-active-mark) (not (eq (mark) (point)))))
301 nodes node-name next-node previous-node up-node)
302 ;; Build list of nodes in current buffer.
303 ;; (What about using `imenu--index-alist'?)
304 ;; FIXME: Support multi-file documents.
306 (goto-char (point-min))
307 (while (re-search-forward "^@node\\b" nil t)
308 (skip-chars-forward " \t")
310 (list (buffer-substring-no-properties
311 (point) (progn (skip-chars-forward "^,")
314 (setq node-name (read-string "Node name: ")))
315 ;; FIXME: What if key binding for `minibuffer-complete' was changed?
316 ;; `substitute-command-keys' doesn't return the correct value.
317 (setq next-node (completing-read "Next node (TAB completes): " nodes))
319 (completing-read "Previous node (TAB completes): " nodes))
320 (setq up-node (completing-read "Upper node (TAB completes): " nodes))
321 (when (and active-mark
323 (exchange-point-and-mark))
328 (insert ", " next-node ", " previous-node ", " up-node
329 "\n@comment node-name, next, previous, up\n")
330 ;; Position point at first empty field.
331 (unless (and (or (> (length node-name) 0) active-mark)
332 (> (length next-node) 0)
333 (> (length previous-node) 0)
334 (> (length up-node) 0))
338 (if (or (> (length node-name) 0) active-mark)
339 (progn (skip-chars-forward "^,") (forward-char 2))
341 (dolist (node (list next-node previous-node up-node))
342 (if (> (length node) 0)
343 (progn (skip-chars-forward "^,") (forward-char 2))
344 (throw 'break nil)))))))
346 ;; Silence the byte-compiler from warnings for variables and functions declared
349 (defvar reftex-section-levels-all)
350 (defvar reftex-level-indent)
351 (defvar reftex-label-menu-flags)
352 (defvar reftex-tables-dirty)
354 (when (fboundp 'declare-function)
355 (declare-function reftex-match-string "reftex" (n))
356 (declare-function reftex-section-number "reftex-parse" (&optional level star))
357 (declare-function reftex-nicify-text "reftex" (text))
358 (declare-function reftex-ensure-compiled-variables "reftex" ())))
360 (defun Texinfo-reftex-section-info (file)
361 ;; Return a section entry for the current match.
362 ;; Carefull: This function expects the match-data to be still in place!
363 (let* ((marker (set-marker (make-marker) (1- (match-beginning 3))))
364 (macro (reftex-match-string 3))
365 (level-exp (cdr (assoc macro reftex-section-levels-all)))
366 (level (if (symbolp level-exp)
367 (save-match-data (funcall level-exp))
369 (unnumbered (< level 0))
371 (section-number (reftex-section-number level unnumbered))
372 (text1 (save-match-data
374 (buffer-substring-no-properties (point) (progn (end-of-line) (point))))))
375 (literal (buffer-substring-no-properties
376 (1- (match-beginning 3))
377 (min (point-max) (+ (match-end 0) (length text1) 1))))
378 ;; Literal can be too short since text1 too short. No big problem.
379 (text (reftex-nicify-text text1)))
381 ;; Add section number and indentation
384 (make-string (* reftex-level-indent level) ?\ )
385 (if (nth 1 reftex-label-menu-flags) ; section number flag
386 (concat section-number " "))
388 (list 'toc "toc" text file marker level section-number
389 literal (marker-position marker))))
391 (defun Texinfo-reftex-hook ()
392 "Hook function to plug Texinfo into RefTeX."
393 ;; force recompilation of variables
394 (when (string= TeX-base-mode-name "Texinfo")
395 (dolist (v `((reftex-section-pre-regexp . "@")
396 ; section post-regexp must contain exactly one group
397 (reftex-section-post-regexp . "\\([ \t]+\\)")
398 (reftex-section-info-function . Texinfo-reftex-section-info)
399 (reftex-section-levels
402 (if (string-match "\\(\\`unnumbered\\)\\|\\(heading\\'\\)\\|\\(\\`top\\'\\)"
404 (cons (car x) (- (cadr x)))
405 (cons (car x) (cadr x))))
406 texinfo-section-list))))
407 (set (make-local-variable (car v) ) (cdr v)))
408 (setq reftex-tables-dirty t)
409 (reftex-ensure-compiled-variables)))
413 (defvar Texinfo-mode-map
414 (let ((map (make-sparse-keymap)))
415 (set-keymap-parent map TeX-mode-map)
418 ;; bindings for updating nodes and menus
419 (define-key map "\C-c\C-um" 'texinfo-master-menu)
420 (define-key map "\C-c\C-u\C-m" 'texinfo-make-menu)
421 (define-key map "\C-c\C-u\C-n" 'texinfo-update-node)
422 (define-key map "\C-c\C-u\C-e" 'texinfo-every-node-update)
423 (define-key map "\C-c\C-u\C-a" 'texinfo-all-menus-update)
425 ;; Simulating LaTeX-mode
426 (define-key map "\C-c\C-e" 'Texinfo-environment)
427 (define-key map "\C-c." 'Texinfo-mark-environment)
428 (define-key map "\C-c*" 'Texinfo-mark-section)
429 (define-key map "\M-\C-h" 'Texinfo-mark-node)
430 (define-key map "\C-c\n" 'texinfo-insert-@item)
431 (or (key-binding "\e\r")
432 (define-key map "\e\r" 'texinfo-insert-@item)) ;*** Alias
433 (define-key map "\C-c\C-s" 'Texinfo-insert-node)
434 (define-key map "\C-c]" 'texinfo-insert-@end)
436 "Keymap for Texinfo mode.")
438 (easy-menu-define Texinfo-command-menu
440 "Menu used in Texinfo mode for external commands."
441 (TeX-mode-specific-command-menu 'texinfo-mode))
443 (easy-menu-define Texinfo-mode-menu
445 "Menu used in Texinfo mode."
448 ["Node ..." texinfo-insert-@node
449 :help "Insert a node"]
450 ["Macro ..." TeX-insert-macro
451 :help "Insert a macro and possibly arguments"]
452 ["Complete Macro" TeX-complete-symbol
453 :help "Complete the current macro"]
454 ["Environment ..." Texinfo-insert-environment
455 :help "Insert an environment"]
456 ["Item" texinfo-insert-@item
457 :help "Insert an @item"]
460 ["Emphasize" (TeX-font nil ?\C-e) :keys "C-c C-f C-e"]
461 ["Bold" (TeX-font nil ?\C-b) :keys "C-c C-f C-b"]
462 ["Typewriter" (TeX-font nil ?\C-t) :keys "C-c C-f C-t"]
463 ["Small Caps" (TeX-font nil ?\C-c) :keys "C-c C-f C-c"]
464 ["Italic" (TeX-font nil ?\C-i) :keys "C-c C-f C-i"]
465 ["Sample" (TeX-font nil ?\C-s) :keys "C-c C-f C-s"]
466 ["Roman" (TeX-font nil ?\C-r) :keys "C-c C-f C-r"])
468 ["Emphasize" (TeX-font t ?\C-e) :keys "C-u C-c C-f C-e"]
469 ["Bold" (TeX-font t ?\C-b) :keys "C-u C-c C-f C-b"]
470 ["Typewriter" (TeX-font t ?\C-t) :keys "C-u C-c C-f C-t"]
471 ["Small Caps" (TeX-font t ?\C-c) :keys "C-u C-c C-f C-c"]
472 ["Italic" (TeX-font t ?\C-i) :keys "C-u C-c C-f C-i"]
473 ["Sample" (TeX-font t ?\C-s) :keys "C-u C-c C-f C-s"]
474 ["Roman" (TeX-font t ?\C-r) :keys "C-u C-c C-f C-r"])
475 ["Delete Font" (TeX-font t ?\C-d) :keys "C-c C-f C-d"]
477 ["Create Master Menu" texinfo-master-menu
478 :help "Make a master menu for the whole Texinfo file"]
479 ["Create Menu" texinfo-make-menu
480 :help "Make or update the menu for the current section"]
481 ["Update Node" texinfo-update-node
482 :help "Update the current node"]
483 ["Update Every Node" texinfo-every-node-update
484 :help "Update every node in the current file"]
485 ["Update All Menus" texinfo-all-menus-update
486 :help "Update every menu in the current file"]
489 ["Comment or Uncomment Region"
490 TeX-comment-or-uncomment-region
491 :help "Comment or uncomment the currently selected region"]
492 ["Comment or Uncomment Paragraph"
493 TeX-comment-or-uncomment-paragraph
494 :help "Comment or uncomment the current paragraph"])
497 . ,TeX-common-menu-entries)))
499 (defvar Texinfo-font-list
516 "Font commands used in Texinfo mode. See `TeX-font-list'.")
521 (defalias 'Texinfo-mode 'texinfo-mode)
524 (defun TeX-texinfo-mode ()
525 "Major mode in AUCTeX for editing Texinfo files.
530 Entering Texinfo mode calls the value of `text-mode-hook' and then the
531 value of `Texinfo-mode-hook'."
533 (kill-all-local-variables)
535 ;; Mostly stolen from texinfo.el
536 (setq TeX-base-mode-name "Texinfo")
537 (setq major-mode 'texinfo-mode)
538 (use-local-map Texinfo-mode-map)
539 (set-syntax-table texinfo-mode-syntax-table)
540 (make-local-variable 'page-delimiter)
543 "^@node [ \t]*[Tt]op\\|^@\\("
544 texinfo-chapter-level-regexp
546 (make-local-variable 'require-final-newline)
547 (setq require-final-newline t)
548 (make-local-variable 'indent-tabs-mode)
549 (setq indent-tabs-mode nil)
550 (make-local-variable 'paragraph-separate)
551 (setq paragraph-separate
552 (concat "\b\\|^@[a-zA-Z]*[ \n]\\|" paragraph-separate))
553 (make-local-variable 'paragraph-start)
554 (setq paragraph-start
555 (concat "\b\\|^@[a-zA-Z]*[ \n]\\|" paragraph-start))
556 (make-local-variable 'fill-column)
557 (setq fill-column 72)
558 (make-local-variable 'comment-start)
559 (setq comment-start "@c ")
560 (make-local-variable 'comment-start-skip)
561 (setq comment-start-skip "@c +\\|@comment +")
562 (set (make-local-variable 'comment-use-syntax) nil)
563 (make-local-variable 'words-include-escapes)
564 (setq words-include-escapes t)
565 (if (not (boundp 'texinfo-imenu-generic-expression))
566 ;; This was introduced in 19.30.
568 (make-local-variable 'imenu-generic-expression)
569 (setq imenu-generic-expression texinfo-imenu-generic-expression))
570 (make-local-variable 'font-lock-defaults)
571 (setq font-lock-defaults
572 ;; COMPATIBILITY for Emacs 20
573 (if (boundp 'texinfo-font-lock-syntactic-keywords)
574 '(texinfo-font-lock-keywords
575 nil nil nil backward-paragraph
576 (font-lock-syntactic-keywords
577 . texinfo-font-lock-syntactic-keywords))
578 '(texinfo-font-lock-keywords t)))
579 (if (not (boundp 'texinfo-section-list))
580 ;; This was included in 19.31.
582 (make-local-variable 'outline-regexp)
585 (mapconcat 'car texinfo-section-list "\\>\\|")
587 (make-local-variable 'outline-level)
588 (setq outline-level 'texinfo-outline-level))
590 ;; Mostly AUCTeX stuff
591 (easy-menu-add Texinfo-mode-menu Texinfo-mode-map)
592 (easy-menu-add Texinfo-command-menu Texinfo-mode-map)
593 (make-local-variable 'TeX-command-current)
594 (setq TeX-command-current 'TeX-command-master)
596 (setq TeX-default-extension "texi")
597 (make-local-variable 'TeX-esc)
600 (make-local-variable 'TeX-auto-regexp-list)
601 (setq TeX-auto-regexp-list 'TeX-auto-empty-regexp-list)
602 (make-local-variable 'TeX-auto-update)
603 (setq TeX-auto-update t)
605 (setq TeX-command-default "TeX")
606 (setq TeX-header-end "%*end")
607 (setq TeX-trailer-start (regexp-quote (concat TeX-esc "bye")))
609 (make-local-variable 'TeX-complete-list)
610 (setq TeX-complete-list
611 (list (list "@\\([a-zA-Z]*\\)" 1 'TeX-symbol-list nil)
612 (list "" TeX-complete-word)))
614 (make-local-variable 'TeX-font-list)
615 (setq TeX-font-list Texinfo-font-list)
616 (make-local-variable 'TeX-font-replace-function)
617 (setq TeX-font-replace-function 'TeX-font-replace-macro)
619 (add-hook 'find-file-hooks (lambda ()
620 (unless (file-exists-p (buffer-file-name))
621 (TeX-master-file nil nil t))) nil t)
624 '("appendix" (TeX-arg-literal " ") (TeX-arg-free "Title"))
625 '("appendixsec" (TeX-arg-literal " ") (TeX-arg-free "Title"))
626 '("appendixsection" (TeX-arg-literal " ") (TeX-arg-free "Title"))
627 '("appendixsubsec" (TeX-arg-literal " ") (TeX-arg-free "Title"))
628 '("appendixsubsubsec" (TeX-arg-literal " ") (TeX-arg-free "Title"))
630 '("author" (TeX-arg-literal " ") (TeX-arg-free "Author"))
634 '("c" (TeX-arg-literal " ") (TeX-arg-free "Comment"))
635 '("center" (TeX-arg-literal " ") (TeX-arg-free "Line of text"))
636 '("chapheading" (TeX-arg-literal " ") (TeX-arg-free "Title"))
637 '("chapter" (TeX-arg-literal " ") (TeX-arg-free "Title"))
638 '("cindex" (TeX-arg-literal " ") (TeX-arg-free "Entry"))
639 '("cite" "Reference")
640 '("clear" (TeX-arg-literal " ") (TeX-arg-free "Flag"))
641 '("code" "Sample code")
642 '("command" "Command")
643 '("comment" (TeX-arg-literal " ") (TeX-arg-free "Comment"))
646 '("defcodeindex" (TeX-arg-literal " ") (TeX-arg-free "Index name"))
647 '("defindex" (TeX-arg-literal " ") (TeX-arg-free "Index name"))
652 '("email" "Email address")
655 '("evenfooting" Texinfo-lrc-argument-hook)
656 '("evenheading" Texinfo-lrc-argument-hook)
657 '("everyfooting" Texinfo-lrc-argument-hook)
658 '("everyheading" Texinfo-lrc-argument-hook)
659 '("exdent" (TeX-arg-literal " ") (TeX-arg-free "Line of text"))
663 '("findex" (TeX-arg-literal " ") (TeX-arg-free "Entry"))
664 '("footnote" "Text of footnote")
665 '("footnotestyle" (TeX-arg-literal " ") (TeX-arg-free "Style"))
667 '("heading" (TeX-arg-literal " ") (TeX-arg-free "Title"))
668 ;; XXX: Would be nice with completion.
669 '("headings" (TeX-arg-literal " ") (TeX-arg-free "On off single double"))
672 '("include" (TeX-arg-literal " ") (TeX-arg-free "Filename"))
673 '("inforef" "Node name" "Info file name")
676 '("kbd" "Keyboard characters")
678 '("kindex" (TeX-arg-literal " ") (TeX-arg-free "Entry"))
680 '("majorheading" (TeX-arg-literal " ") (TeX-arg-free "Title"))
684 '("node" (TeX-arg-literal " ") (TeX-arg-free "Name")
685 (TeX-arg-literal ", ") (TeX-arg-free "Next")
686 (TeX-arg-literal ", ") (TeX-arg-free "Previous")
687 (TeX-arg-literal ", ") (TeX-arg-free "Up"))
689 '("oddfooting" Texinfo-lrc-argument-hook)
690 '("oddheading" Texinfo-lrc-argument-hook)
692 '("paragraphindent" (TeX-arg-literal " ") (TeX-arg-free "Indent"))
696 '("printindex" (TeX-arg-literal " ") (TeX-arg-free "Index name"))
697 '("pxref" "Node name")
705 '("section" (TeX-arg-literal " ") (TeX-arg-free "Title"))
706 '("set" (TeX-arg-literal " ") (TeX-arg-free "Flag"))
707 ;; XXX: Would be nice with completion.
708 '("setchapternewpage" (TeX-arg-literal " ") (TeX-arg-free "On off odd"))
709 '("setfilename" (TeX-arg-literal " ") (TeX-arg-free "Info file name"))
710 '("settitle" (TeX-arg-literal " ") (TeX-arg-free "Title"))
715 '("subheading" (TeX-arg-literal " ") (TeX-arg-free "Title"))
716 '("subsection" (TeX-arg-literal " ") (TeX-arg-free "Title"))
717 '("subsubheading" (TeX-arg-literal " ") (TeX-arg-free "Title"))
718 '("subsubsection" (TeX-arg-literal " ") (TeX-arg-free "Title"))
719 '("subtitle" (TeX-arg-literal " ") (TeX-arg-free "Title"))
721 '("syncodeindex" (TeX-arg-literal " ") (TeX-arg-free "From index")
722 (TeX-arg-literal " ") (TeX-arg-free "Into index"))
723 '("synindex" (TeX-arg-literal " ") (TeX-arg-free "From index")
724 (TeX-arg-literal " ") (TeX-arg-free "Into index"))
731 '("tindex" (TeX-arg-literal " ") (TeX-arg-free "Entry"))
732 '("title" (TeX-arg-literal " ") (TeX-arg-free "Title"))
733 '("titlefont" "Text")
736 '("top" (TeX-arg-literal " ") (TeX-arg-free "Title"))
737 '("unnumbered" (TeX-arg-literal " ") (TeX-arg-free "Title"))
738 '("unnumberedsec" (TeX-arg-literal " ") (TeX-arg-free "Title"))
739 '("unnumberedsubsec" (TeX-arg-literal " ") (TeX-arg-free "Title"))
740 '("unnumberedsubsubsec" (TeX-arg-literal " ") (TeX-arg-free "Title"))
742 '("var" "Metasyntactic variable")
743 '("vindex" (TeX-arg-literal " ") (TeX-arg-free "Entry"))
744 '("vskip" (TeX-arg-literal " ") (TeX-arg-free "Amount"))
746 '("xref" "Node name"))
749 (add-hook 'reftex-mode-hook 'Texinfo-reftex-hook)
750 (if (and (boundp 'reftex-mode) reftex-mode)
751 (Texinfo-reftex-hook))
753 (TeX-run-mode-hooks 'text-mode-hook 'Texinfo-mode-hook)
756 (defcustom Texinfo-clean-intermediate-suffixes nil
757 "List of regexps matching suffixes of files to be deleted.
758 The regexps will be anchored at the end of the file name to be matched,
759 i.e. you do _not_ have to cater for this yourself by adding \\\\' or $."
760 :type '(repeat regexp)
763 (defcustom Texinfo-clean-output-suffixes
764 ;; See `man texi2html' for the HTML stuff.
765 '("\\.info\\(-[0-9]+\\)?" "\\.dvi" "\\.pdf" "\\.ps" "\\.html"
766 "_toc\\.html" "_fot\\.html" "_abt\\.html" "_[0-9]+\\.html" "_l2h_img.+")
767 "List of regexps matching suffixes of files to be deleted.
768 The regexps will be anchored at the end of the file name to be matched,
769 i.e. you do _not_ have to cater for this yourself by adding \\\\' or $."
770 :type '(repeat regexp)
775 ;;; tex-info.el ends here