]> code.delx.au - gnu-emacs-elpa/blob - packages/auctex/style/index.el
Remove version numbers in packages/ directory
[gnu-emacs-elpa] / packages / auctex / style / index.el
1 ;;; index.el --- AUCTeX support for indices with index.sty.
2
3 ;; Copyright (C) 1999 Free Software Foundation, Inc.
4
5 ;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl>
6 ;; Maintainer: auctex-devel@gnu.org
7
8 ;; This file is part of AUCTeX.
9
10 ;; AUCTeX is free software; you can redistribute it and/or modify it
11 ;; under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 3, or (at your option)
13 ;; any later version.
14
15 ;; AUCTeX is distributed in the hope that it will be useful, but
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ;; General Public License for more details.
19
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with AUCTeX; see the file COPYING. If not, write to the Free
22 ;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
23 ;; 02110-1301, USA.
24
25 ;;; Code:
26
27 (TeX-add-style-hook "index"
28 (lambda ()
29
30 (TeX-add-symbols
31
32 ;; New indices
33 '("newindex" [ "Counter" ] "Tag"
34 "Extension of raw index" "Extension of processed index" "Index title")
35 '("renewindex" [ "Counter" ] "Tag"
36 "Extension of raw index" "Extension of processed index" "Index title")
37 "makeindex"
38 '("disableindex" "Tag[,tag...]")
39
40 ;; Printing the index
41 '("printindex" [ "Indextag" ] [ "Prologue" ])
42 "indexspace"
43
44 ;; Index entries
45 '("index" [ TeX-arg-index-tag ] TeX-arg-index)
46 '("index*" [ TeX-arg-index-tag ] TeX-arg-index)
47
48 ;; Showidx-like stuff
49 "proofmodetrue" "proofmodefalse" '("indexproofstyle" "Style")
50
51 ;; Shortcuts (THESE ARE DEPRECATED AND SHOULD NOT BE USED
52 "shortindexingon" "shortindexinoff")
53
54 ;; Parsing index macros
55 (setq LaTeX-auto-regexp-list
56 (append
57
58 ;; The first regexp is faster, but less accurate
59 ;;'(("\\\\index\\*?\\[[^{}]*\\]{\\([^}]*\\)"
60 ;; 1 LaTeX-auto-index-entry))
61
62 ;; The second regexp is very good, but slower.
63 '(("\\\\index\\*?\\[[^{}]*\\]{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*}[^}{]*\\)*}[^}{]*\\)*\\)}"
64 1 LaTeX-auto-index-entry))
65
66 LaTeX-auto-regexp-list))
67
68 ;; Completion for the index entries in \index and |see commands
69 (setq TeX-complete-list
70 (append
71 '(("\\\\index\\*?\\(\\[[^][{}]*\\]\\)?{\\([^{}\n\r]*\\)"
72 2 LaTeX-index-entry-list)
73 ("|see{\\([^}]*\\)" 1 LaTeX-index-entry-list))
74 TeX-complete-list))
75
76 ;; RefTeX support
77 (and (fboundp 'reftex-add-index-macros)
78 (reftex-add-index-macros '(index)))))
79
80 (defvar LaTeX-index-package-options nil
81 "Package options for the index package.")
82
83 ;;; index.el ends here