Initial Commit
[packages] / xemacs-packages / auctex / style / multind.el
1 ;;; multind.el --- AUCTeX support for multiple indices with multind.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 "multind"
28   (lambda ()
29
30     ;; Commands
31     (TeX-add-symbols
32      '("makeindex" "Indextag")
33      '("index" TeX-arg-index-tag TeX-arg-index)
34      '("printindex" TeX-arg-index-tag "Title")
35      "printindex" "indexspace")
36
37     ;; Parsing index macros
38     (setq LaTeX-auto-regexp-list
39           (append
40            ;; The first regexp is faster, but less accurate
41            ;; '(("\\\\index\\*?{[^{}]*}{\\([^}]*\\)" 1 LaTeX-auto-index-entry))
42            ;; The second regexp is very good, but slower
43            '(("\\\\index\\*?{[^{}]*}{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*}[^}{]*\\)*}[^}{]*\\)*\\)}"
44               1 LaTeX-auto-index-entry))
45            LaTeX-auto-regexp-list))
46
47     ;; Completion for index entries in the |see and \index commands
48     (setq TeX-complete-list 
49           (append
50            '(("\\\\index{[^{}]*}{\\([^{}\n\r]*\\)" 1 LaTeX-index-entry-list)
51              ("|see{\\([^}]*\\)" 1 LaTeX-index-entry-list))
52            TeX-complete-list))
53
54     ;; RefTeX support
55     (and (fboundp 'reftex-add-index-macros)
56          (reftex-add-index-macros '(multind))))
57   LaTeX-dialect)
58
59 (defvar LaTeX-multind-package-options nil
60   "Package options for the multind package.")
61
62 ;;; multind.el ends here