Initial Commit
[packages] / xemacs-packages / auctex / style / mdwlist.el
1 ;;; mdwlist.el --- AUCTeX style for `mdwlist.sty'
2
3 ;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.
4
5 ;; Maintainer: auctex-devel@gnu.org
6 ;; Keywords: tex
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 ;;; Commentary:
26
27 ;; This file adds support for `mdwlist.sty'.
28
29 ;;; Code:
30
31 (TeX-add-style-hook
32  "mdwlist"
33  (lambda ()
34    (TeX-add-symbols
35     '("makecompactlist" "New environment" "Existing environment")
36     '("suspend" "Environment") ; this could be done nicer by automatically
37     '("resume" "Environment")) ; determining the environment
38    (LaTeX-add-environments
39     '("enumerate*" LaTeX-env-item)
40     '("itemize*" LaTeX-env-item)
41     '("description*" LaTeX-env-item))
42    ;; Indentation and filling
43    (make-local-variable 'LaTeX-begin-regexp)
44    (setq LaTeX-begin-regexp (concat LaTeX-begin-regexp "\\|resume\\b"))
45    (make-local-variable 'LaTeX-end-regexp)
46    (setq LaTeX-end-regexp (concat LaTeX-end-regexp "\\|suspend\\b"))
47    (make-local-variable 'paragraph-start)
48    (setq paragraph-start (concat paragraph-start
49                                  "\\|[ \t]*" TeX-comment-start-regexp "*[ \t]*"
50                                  (regexp-quote TeX-esc)
51                                  "\\(resume\\b\\|suspend\\b\\)"))
52    ;; Fontification
53    (when (and (featurep 'font-latex)
54               (eq TeX-install-font-lock 'font-latex-setup))
55      (font-latex-add-keywords '(("makecompactlist" "{{")
56                                 ("suspend" "[{")
57                                 ("resume" "[{["))
58                               'function)))
59  LaTeX-dialect)
60
61 (defvar LaTeX-mdwlist-package-options nil
62   "Package options for the mdwlist package.")
63
64 ;;; mdwlist.el ends here