1 ;;; context-en.el --- Support for the ConTeXt english interface.
3 ;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
5 ;; Maintainer: Berend de Boer <berend@pobox.com>
8 ;; This file is part of AUCTeX.
10 ;; AUCTeX is free software; you can redistribute it and/or modify it
11 ;; under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 3, or (at your option)
15 ;; AUCTeX is distributed in the hope that it will be useful, but
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ;; General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with AUCTeX; see the file COPYING. If not, write to the Free
22 ;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
27 ;; This file is loaded by context.el when required.
34 ;;; ConText macro names
37 (defvar ConTeXt-environment-list-en
38 '("alignment" "appendices"
39 "background" "backmatter" "bodymatter" "bodypart" "buffer"
40 "code" "color" "columns" "combination"
41 "encoding" "extroductions"
42 "fact" "formula" "framedcode" "framedtext" "frontmatter"
45 "legend" "line" "linecorrection" "linenumbering" "lines"
46 "localenvironment" "localfootnotes"
47 "makeup" "mapping" "marginblock" "marginedge" "marginrule" "mode"
50 "packed" "pagecomment" "pagefigure" "positioning" "postponing"
54 "table" "tabulate" "TEXpage" "text" "textbackground" "typing"
57 "component" "environment" "product" "project"
58 ;; flowcharts, if you have loaded this module
59 "FLOWcell" "FLOWchart"
60 ;; typesetting computer languages
61 "EIFFEL" "JAVA" "JAVASCRIPT" "MP" "PASCAL" "PERL" "SQL" "TEX" "XML"
62 ;; some metapost environments
63 "MPpositiongraphic" "useMPgraphic" "MPcode" "reusableMPgraphic"
65 "List of the ConTeXt en interface start/stop pairs.")
67 (defvar ConTeXt-define-list-en
69 "background" "blank" "block" "blocks" "bodyfont" "bodyfontenvironment"
71 "casemap" "character" "color" "colorgroup" "combinedlist" "command"
72 "description" "enumeration"
73 "float" "font" "fontsynonym" "framedtext" "head"
76 "palet" "program" "startstop" "type" "typing")
77 "List of the names of ConTeXt en interface macro's that define things.")
79 (defvar ConTeXt-setup-list-en
80 '("align" "arranging" "background" "backgrounds" "blackrules"
81 "blank" "block" "bodyfont" "bodyfontenvironment" "bottom"
82 "bottomtexts" "buffer" "capitals" "caption" "captions" "color"
83 "colors" "columns" "combinations" "combinedlist" "descriptions"
84 "enumerations" "externalfigures" "fillinlines" "fillinrules" "float"
85 "floats" "footer" "footertexts" "footnodedefinition" "footnotes"
86 "framed" "framedtexts" "head" "header" "headertexts" "headnumber"
87 "heads" "headtext" "hyphenmark" "indentations" "indenting" "inmargin"
88 "interlinespace" "itemize" "items" "labeltext" "language" "layout"
89 "linenumbering" "lines" "list" "makeup" "marginblocks"
90 "marginrules" "marking" "narrower" "oppositeplacing"
91 "pagecomment" "pagenumber" "pagenumbering" "palet" "papersize" "paragraphs"
92 "quote" "referencing" "register"
93 "screens" "section" "sectionblock" "sorting" "spacing"
94 "subpagenumber" "synonyms" "text" "textrules" "texttexts" "thinrules"
95 "tolerance" "top" "toptexts" "type" "typing" "underbar" "whitespace")
96 "List of the names of ConTeXt en interface macro's that setup things.")
98 ;; referencing in ConTeXt
99 (defvar ConTeXt-referencing-list-en
100 '("in" "at" "about" "pagereference" "textreference" "reference")
101 "List of ConTeXt en macro's that are used for referencing."
104 ;; lists some place macro's as well, should perhaps be under separate menu
105 (defvar ConTeXt-other-macro-list-en
106 '("abbreviation" "adaptlayout" "at" "combinepages" "copypages"
107 "externalfigure" "framed" "from" "input" "insertpages" "filterpages"
109 "hideblocks" "keepblocks"
110 "leftaligned" "midaligned"
113 "placecontent" "placeexternalfigure" "placefigure" "placelogos" "placetable"
114 "processblocks" "protect"
115 "raggedcenter" "rightaligned" "rotate"
116 "scale" "selectblocks" "showexternalfigures" "slicepages"
117 "useexternalfigure" "unprotect" "url" "useblocks" "usemodule" "useURL"
119 "List of ConTeXt en interface macro's that are not an environment nor a setup.")
121 (defun ConTeXt-define-command-en (what)
122 "The ConTeXt en interface way of creating a define command."
123 (concat "define" what))
125 (defun ConTeXt-setup-command-en (what)
126 "The ConTeXt en interface way of creating a setup command."
127 (concat "setup" what))
129 (defvar ConTeXt-project-structure-list-en
130 '("project" "environment" "product" "component")
131 "List of the names of ConTeXt project structure elements for its en interface. List should be in logical order.")
133 (defvar ConTeXt-section-block-list-en
134 '("frontmatter" "bodymatter" "appendices" "backmatter")
135 "List of the names of ConTeXt section blocks for its en interface. List should be in logical order.")
139 ;; ConTeXt has alternative sections like title and subject. Currently
140 ;; the level is used to find the section name, so the alternative
141 ;; names are never found. Have to start using the section name instead
143 (defvar ConTeXt-section-list-en
152 ;; ("subsubsubject" 4)
153 "List of the names of ConTeXt sections for its en interface.")
155 (defvar ConTeXt-text-en "text"
156 "The ConTeXt en interface body text group.")
158 (defvar ConTeXt-item-list-en
159 '("item" "its" "mar" "ran" "sub" "sym")
160 "The ConTeXt macro's that are variants of item.")
162 (defcustom ConTeXt-default-environment-en "itemize"
163 "*The default environment when creating new ones with `ConTeXt-environment'."
164 :group 'ConTeXt-en-environment
168 ;; Emacs en menu names and labels should go here
174 (defun ConTeXt-en-mode-initialization ()
175 "ConTeXt english interface specific initialization."
176 (mapc 'ConTeXt-add-environments (reverse ConTeXt-environment-list-en))
179 '("but" ConTeXt-arg-define-ref (TeX-arg-literal " "))
180 '("item" ConTeXt-arg-define-ref (TeX-arg-literal " "))
181 '("items" [ConTeXt-arg-setup] (TeX-arg-string "Comma separated list"))
182 '("its" ConTeXt-arg-define-ref (TeX-arg-literal " "))
183 '("nop" (TeX-arg-literal " "))
184 '("ran" TeX-arg-string (TeX-arg-literal " "))
185 '("sub" ConTeXt-arg-define-ref (TeX-arg-literal " "))
186 '("sym" (TeX-arg-string "Symbol") (TeX-arg-literal " "))))
189 (defun context-en-mode ()
190 "Major mode for editing files for ConTeXt using its english interface.
195 Entering `context-mode' calls the value of `text-mode-hook',
196 then the value of TeX-mode-hook, and then the value
197 of context-mode-hook."
199 ;; set the ConTeXt interface
200 (setq ConTeXt-current-interface "en")
203 (ConTeXt-mode-common-initialization)
204 (ConTeXt-en-mode-initialization)
207 (setq TeX-base-mode-name "ConTeXt-en")
210 (provide 'context-en)
212 ;;; context-en.el ends here