1 ;;; paralist.el -- AUCTeX style for paralist.sty
3 ;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
5 ;; Author: Ralf Angeli <angeli@iwi.uni-sb.de>
6 ;; Maintainer: auctex-devel@gnu.org
10 ;; This file is part of AUCTeX.
12 ;; AUCTeX is free software; you can redistribute it and/or modify it
13 ;; under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 3, or (at your option)
17 ;; AUCTeX is distributed in the hope that it will be useful, but
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 ;; General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with AUCTeX; see the file COPYING. If not, write to the Free
24 ;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
29 ;; This file adds support for `paralist.sty'.
33 ;; Insert an itemize-ish environment and ask for an optional label
34 (defun LaTeX-paralist-env-item-opt-label (environment)
35 "Insert ENVIRONMENT, an optional label and the first item."
36 (LaTeX-insert-environment
38 (let ((label (read-string "(Optional) Label: ")))
39 (concat (unless (zerop (length label))
40 (format "[%s]" label)))))
41 (LaTeX-find-matching-begin)
44 (delete-horizontal-space)
51 ;; Add compactdesc to the list of environments which have an optional
52 ;; argument for each item.
53 (add-to-list 'LaTeX-item-list '("compactdesc" . LaTeX-item-argument))
59 '("paradescriptionlabel")
60 '("setdefaultitem" "First level" "Second level" "Third level"
62 '("setdefaultenum" "First level" "Second level" "Third level"
64 '("setdefaultleftmargin" "First level" "Second level" "Third level"
65 "Fourth level" "Fifth level" "Sixth level"))
68 (LaTeX-add-environments
69 '("asparaenum" LaTeX-paralist-env-item-opt-label)
70 '("inparaenum" LaTeX-paralist-env-item-opt-label)
71 '("compactenum" LaTeX-paralist-env-item-opt-label)
72 '("asparaitem" LaTeX-paralist-env-item-opt-label)
73 '("inparaitem" LaTeX-paralist-env-item-opt-label)
74 '("compactitem" LaTeX-paralist-env-item-opt-label)
75 '("compactdesc" LaTeX-env-item)
76 ;; FIXME: Should not be available if package is loaded with option
78 '("itemize" LaTeX-paralist-env-item-opt-label)
79 ;; FIXME: Should not be available if package is loaded with option
81 '("enumerate" LaTeX-paralist-env-item-opt-label)
82 ;; FIXME: Only defined if package is loaded with option
84 '("asparablank" LaTeX-env-item)
85 '("inparablank" LaTeX-env-item))
88 (when (and (featurep 'font-latex)
89 (eq TeX-install-font-lock 'font-latex-setup))
90 (font-latex-add-keywords '(("setdefaultitem" "{{{{")
91 ("setdefaultenum" "{{{{")
92 ("setdefaultleftmargin" "{{{{{{"))
95 (defvar LaTeX-paralist-package-options '("newitem" "olditem" "newenum"
96 "oldenum" "alwaysadjust"
97 "neveradjust" "neverdecrease"
98 "increaseonly" "defblank"
99 "pointedenum" "pointlessenum"
100 "cfg" "nocfg" "flushright"
102 "Package options for the paralist package.")
104 ;;; paralist.el ends here