Initial Commit
[packages] / xemacs-packages / auctex / style / pst-grad.el
1 ;;; pst-grad.el --- AUCTeX style for `pst-grad.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-grad.sty'.
29
30 ;;; TODO:
31 ;;
32 ;; -- 
33
34 ;;; Code:
35
36 ;;; Parameters
37 (defvar LaTeX-pstgrad-parameters-name-list
38   '("gradangle" "gradbegin" "gradend" "gradlines" "gradmidpoint"
39     "gradientHSB" "GradientCircle" "GradientPos" "GradientScale")
40   "A list of parameter names in pst-grad.")
41
42 ;;; Aliases
43 (defvaralias 'LaTeX-pst-gradbegin-list 'LaTeX-pst-color-list)
44 (defvaralias 'LaTeX-pst-gradend-list 'LaTeX-pst-color-list)
45
46 ;;; Hook
47 (TeX-add-style-hook
48  "pst-grad"
49  (function
50   (lambda ()
51     (TeX-run-style-hooks
52      "pstricks")
53     (unless (member "gradient" LaTeX-pst-fillstyle-list)
54       (setq LaTeX-pst-fillstyle-list (append LaTeX-pst-fillstyle-list
55                                              '("gradient")))
56       (setq LaTeX-pst-parameters-completion-regexp
57             (concat
58              (substring LaTeX-pst-parameters-completion-regexp 0 -2)
59              "\\|gradbegin\\|gradend\\)")))
60     (make-local-variable 'LaTeX-pst-parameters-name-list)
61     (setq LaTeX-pst-parameters-name-list
62           (append LaTeX-pstgrad-parameters-name-list
63                   LaTeX-pst-parameters-name-list))))
64  LaTeX-dialect)
65
66 ;;; pst-grad.el ends here