Debian Codegraph @

texmf-dist/doc/latex/dox/dox.el

raw
1 ;;; dox.el --- AUCTeX style file for DoX
2
3 ;; Copyright (C) 2009, 2010, 2017 Didier Verna
4
5 ;; Author: Didier Verna <[email protected]>
6 ;; Keywords: tex abbrev data
7
8 ;; This file is part of DoX.
9
10 ;; DoX may be distributed and/or modified under the conditions of the LaTeX
11 ;; Project Public License, either version 1.3 of this license or (at your
12 ;; option) any later version. The latest version of this license is in
13 ;; http://www.latex-project.org/lppl.txt and version 1.3 or later is part of
14 ;; all distributions of LaTeX version 2005/12/01 or later.
15
16 ;; DoX consists of all files listed in the file `README.md'.
17
18
19 ;;; Commentary:
20
21
22 ;;; Code:
23
24 (TeX-add-style-hook "dox"
25 (lambda ()
26 (TeX-add-symbols
27 '("doxitem" [ TeX-arg-key-val (("idxtype") ("macrolike")) ]
28 "Function name" "Environment name" "Index category name"))
29 (when (and (featurep 'font-latex)
30 (eq TeX-install-font-lock 'font-latex-setup))
31 (font-latex-add-keywords '(("doxitem" "[{{{")) 'function)))
32 LaTeX-dialect)
33
34 (defun doxitem (envname)
35 "Register a new environment ENVNAME with AUCTeX.
36 The effect is to make docTeX mode treat this new environment just
37 like the macro and environment ones. Currently, this means
38 avoiding inner indentation.
39
40 ENVNAME is actually a regexp appearing in a logical group. This
41 means that you can register several environments simultaneously
42 by means or regexp combination."
43 (make-local-variable 'docTeX-indent-inner-fixed)
44 (push (list
45 (concat (regexp-quote TeX-esc)
46 "\\(begin\\|end\\)[ \t]*{\\("
47 envname
48 "\\)\\*?}")
49 0 nil)
50 docTeX-indent-inner-fixed))
51
52 (defun doxitems (&rest envnames)
53 "Register environments ENVNAMES with AUCTeX.
54 See the function `doxitem' for more information."
55 (mapc #'doxitem envnames))
56
57
58
59
60 ;;; Local variables:
61 ;;; eval: (put 'TeX-add-style-hook 'lisp-indent-function 1)
62 ;;; End:
63
64 ;;; dox.el ends here