]> code.delx.au - gnu-emacs-elpa/blob - packages/auctex-11.86/context-en.el
(debbugs-emacs): New function and modes for listing the Emacs bugs, reading them...
[gnu-emacs-elpa] / packages / auctex-11.86 / context-en.el
1 ;;; context-en.el --- Support for the ConTeXt english interface.
2
3 ;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
4
5 ;; Maintainer: Berend de Boer <berend@pobox.com>
6 ;; Keywords: tex
7
8 ;; This file is part of AUCTeX.
9
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)
13 ;; any later version.
14
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.
19
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
23 ;; 02110-1301, USA.
24
25 ;;; Commentary:
26
27 ;; This file is loaded by context.el when required.
28
29 ;;; Code:
30
31 ;; Build upon ConTeXt
32 (require 'context)
33
34 ;;; ConText macro names
35
36 ;;; Code:
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"
43 "helptext" "hiding"
44 "itemize"
45 "legend" "line" "linecorrection" "linenumbering" "lines"
46 "localenvironment" "localfootnotes"
47 "makeup" "mapping" "marginblock" "marginedge" "marginrule" "mode"
48 "narrower" "notmode"
49 "opposite"
50 "packed" "pagecomment" "pagefigure" "positioning" "postponing"
51 "quotation"
52 "raster" "register"
53 "standardmakeup"
54 "table" "tabulate" "TEXpage" "text" "textbackground" "typing"
55 "unpacked"
56 ;; project structure
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"
64 "uniqueMPgraphic")
65 "List of the ConTeXt en interface start/stop pairs.")
66
67 (defvar ConTeXt-define-list-en
68 '("accent"
69 "background" "blank" "block" "blocks" "bodyfont" "bodyfontenvironment"
70 "buffer"
71 "casemap" "character" "color" "colorgroup" "combinedlist" "command"
72 "description" "enumeration"
73 "float" "font" "fontsynonym" "framedtext" "head"
74 "indenting" "label"
75 "logo" "overlay"
76 "palet" "program" "startstop" "type" "typing")
77 "List of the names of ConTeXt en interface macro's that define things.")
78
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.")
97
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."
102 )
103
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"
108 "getbuffer" "goto"
109 "hideblocks" "keepblocks"
110 "leftaligned" "midaligned"
111 "obeyspaces"
112 "page"
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"
118 "version")
119 "List of ConTeXt en interface macro's that are not an environment nor a setup.")
120
121 (defun ConTeXt-define-command-en (what)
122 "The ConTeXt en interface way of creating a define command."
123 (concat "define" what))
124
125 (defun ConTeXt-setup-command-en (what)
126 "The ConTeXt en interface way of creating a setup command."
127 (concat "setup" what))
128
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.")
132
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.")
136
137
138 ;; TODO:
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
142 ;; of the number.
143 (defvar ConTeXt-section-list-en
144 '(("part" 0)
145 ("chapter" 1)
146 ("section" 2)
147 ("subsection" 3)
148 ("subsubsection" 4))
149 ;; ("title" 1)
150 ;; ("subject" 2)
151 ;; ("subsubject" 3)
152 ;; ("subsubsubject" 4)
153 "List of the names of ConTeXt sections for its en interface.")
154
155 (defvar ConTeXt-text-en "text"
156 "The ConTeXt en interface body text group.")
157
158 (defvar ConTeXt-item-list-en
159 '("item" "its" "mar" "ran" "sub" "sym")
160 "The ConTeXt macro's that are variants of item.")
161
162 (defcustom ConTeXt-default-environment-en "itemize"
163 "*The default environment when creating new ones with `ConTeXt-environment'."
164 :group 'ConTeXt-en-environment
165 :type 'string)
166
167
168 ;; Emacs en menu names and labels should go here
169 ;; to be done
170
171
172 ;;; Mode
173
174 (defun ConTeXt-en-mode-initialization ()
175 "ConTeXt english interface specific initialization."
176 (mapc 'ConTeXt-add-environments (reverse ConTeXt-environment-list-en))
177
178 (TeX-add-symbols
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 " "))))
187
188 ;;;###autoload
189 (defun context-en-mode ()
190 "Major mode for editing files for ConTeXt using its english interface.
191
192 Special commands:
193 \\{ConTeXt-mode-map}
194
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."
198 (interactive)
199 ;; set the ConTeXt interface
200 (setq ConTeXt-current-interface "en")
201
202 ;; initialization
203 (ConTeXt-mode-common-initialization)
204 (ConTeXt-en-mode-initialization)
205
206 ;; set mode line
207 (setq TeX-base-mode-name "ConTeXt-en")
208 (TeX-set-mode-name))
209
210 (provide 'context-en)
211
212 ;;; context-en.el ends here