blob: 2de037d5ed79f604674ef14382c14110e3a253d3 (
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
|
;;; dox.el --- AUCTeX style file for DoX
;; Copyright (C) 2009, 2010, 2017 Didier Verna
;; Author: Didier Verna <didier@didierverna.net>
;; 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.3 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.3 or later is part of
;; all distributions of LaTeX version 2005/12/01 or later.
;; DoX consists of all files listed in the file `README.md'.
;;; Commentary:
;;; Code:
(TeX-add-style-hook "dox"
(lambda ()
(TeX-add-symbols
'("doxitem" [ TeX-arg-key-val (("idxtype") ("macrolike")) ]
"Function name" "Environment name" "Index category name"))
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("doxitem" "[{{{")) 'function)))
LaTeX-dialect)
(defun doxitem (envname)
"Register a new environment ENVNAME with AUCTeX.
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 AUCTeX.
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
|