summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/dox/dox.el
blob: 0463817608319907419bae25f28abe5e55bfb542 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
;;; dox.el --- AUC-TeX style file for DoX

;; Copyright (C) 2009 Didier Verna.

;; Author:        Didier Verna <didier@lrde.epita.fr>
;; Maintainer:    Didier Verna <didier@lrde.epita.fr>
;; Created:       Fri Sep 11 11:24:16 2009
;; Last Revision: Sat Sep 19 09:54:43 2009
;; Keywords:      tex abbrev data


;; This file is part of DoX.

;; DoX may be distributed and/or modified under the
;; conditions of the LaTeX Project Public License, either version 1.1
;; of this license or (at your option) any later version.
;; The latest version of this license is in
;; http://www.latex-project.org/lppl.txt
;; and version 1.1 or later is part of all distributions of LaTeX
;; version 1999/06/01 or later.

;; DoX consists of all files listed in the file `README'.


;;; Commentary:

;; Contents management by FCM version 0.1.



;;; Code:

(TeX-add-style-hook "dox"
  (function
   (lambda ()
     (TeX-add-symbols
      '("doxitem" [ "Options" ]
	"Function name" "Environment name" "Index category name")))))

(defun doxitem (envname)
  "Register a new environment ENVNAME with AUC-TeX.

The effect is to make docTeX mode treat this new environment just like
the macro and environment ones. Currently, this means avoiding inner
indentation.

ENVNAME is actually a regexp appearing in a logical group.
This means that you can register several environments simultaneously
by means or regexp combination."
  (make-local-variable 'docTeX-indent-inner-fixed)
  (push (list
	 (concat (regexp-quote TeX-esc)
		 "\\(begin\\|end\\)[ \t]*{\\("
		 envname
		 "\\)\\*?}")
	 0 nil)
	docTeX-indent-inner-fixed))

(defun doxitems (&rest envnames)
  "Register environments ENVNAMES with AUC-TeX.
See the function `doxitem' for more information."
  (mapc #'doxitem envnames))




;;; Local variables:
;;; eval: (put 'TeX-add-style-hook 'lisp-indent-function 1)
;;; End:

;;; dox.el ends here