Initial Commit
[packages] / xemacs-packages / auctex / style / pst-slpe.el
1 ;;; pst-slpe.el --- AUCTeX style for `pst-slpe.sty'
2
3 ;; Copyright (C) 2007 Free Software Foundation, Inc.
4
5 ;; Author: Holger Sparr <holger.sparr@gmx.net>
6 ;; Created: 21 Jun 2007
7 ;; Keywords: latex, pstricks, auctex, emacs
8
9 ;; This file is part of AUCTeX.
10
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)
14 ;; any later version.
15
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.
20
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
24 ;; 02110-1301, USA.
25
26 ;;; Commentary:
27
28 ;; This file adds support for `pst-slpe.sty'.
29
30 ;;; TODO:
31 ;;
32 ;; -- 
33
34 ;;; Code:
35
36 ;;; Parameters
37 (defvar LaTeX-pstslpe-parameters-name-list
38   '("slopeangle" "slopecenter" "slopecolors" "slopebegin" "slopeend"
39     "sloperadius" "slopesteps")
40   "A list of parameter names in pst-slpe.")
41
42 ;;; Aliases
43 (defvaralias 'LaTeX-pst-slopebegin-list 'LaTeX-pst-color-list)
44 (defvaralias 'LaTeX-pst-slopeend-list 'LaTeX-pst-color-list)
45
46 ;;; Define hook
47 (TeX-add-style-hook
48  "pst-slpe"
49  (function
50   (lambda ()
51     (TeX-run-style-hooks
52      "pstricks")
53     (unless (member "slope" LaTeX-pst-fillstyle-list)
54       (setq LaTeX-pst-fillstyle-list
55             (append LaTeX-pst-fillstyle-list
56                     '("slope" "slopes" "ccslope" "ccslopes" "radslope"
57                     "radslopes")))
58       (setq LaTeX-pst-parameters-completion-regexp
59             (concat
60              (substring LaTeX-pst-parameters-completion-regexp 0 -2)
61              "\\|slopebegin\\|slopeend\\)")))
62     (make-local-variable 'LaTeX-pst-parameters-name-list)
63     (setq LaTeX-pst-parameters-name-list
64           (append LaTeX-pstslpe-parameters-name-list
65                   LaTeX-pst-parameters-name-list))))
66  LaTeX-dialect)
67
68 ;;; pst-slpe.el ends here