(ada-other-file-alist): Variable definition moved to ada-mode.el.
[bpt/emacs.git] / lisp / progmodes / ada-mode.el
CommitLineData
be010748 1;;; ada-mode.el --- An Emacs major-mode for editing Ada source.
972579f9 2
d03b8a2d 3;; Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
972579f9 4
d03b8a2d
RS
5;; Authors: Rolf Ebert <ebert@inf.enst.fr>
6;; Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de>
7;; Keywords: languages oop ada
8;; Rolf Ebert's version: 2.25
9
10;; This file is part of GNU Emacs.
972579f9
RS
11
12;; GNU Emacs is free software; you can redistribute it and/or modify
13;; it under the terms of the GNU General Public License as published by
14;; the Free Software Foundation; either version 2, or (at your option)
15;; any later version.
16
17;; GNU Emacs is distributed in the hope that it will be useful,
18;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;; GNU General Public License for more details.
21
22;; You should have received a copy of the GNU General Public License
b578f267
EN
23;; along with GNU Emacs; see the file COPYING. If not, write to the
24;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25;; Boston, MA 02111-1307, USA.
972579f9
RS
26
27;;; This mode is a complete rewrite of a major mode for editing Ada 83
f139ce87 28;;; and Ada 95 source code under Emacs-19. It contains completely new
972579f9
RS
29;;; indenting code and support for code browsing (see ada-xref).
30
31
972579f9
RS
32;;; USAGE
33;;; =====
cadd3658 34;;; Emacs should enter Ada mode when you load an Ada source (*.ad[abs]).
972579f9
RS
35;;;
36;;; When you have entered ada-mode, you may get more info by pressing
37;;; C-h m. You may also get online help describing various functions by:
38;;; C-h d <Name of function you want described>
39
40
41;;; HISTORY
42;;; =======
3ca7b46f
KH
43;;; The first Ada mode for GNU Emacs was written by V. Broman in
44;;; 1985. He based his work on the already existing Modula-2 mode.
45;;; This was distributed as ada.el in versions of Emacs prior to 19.29.
972579f9
RS
46;;;
47;;; Lynn Slater wrote an extensive Ada mode in 1989. It consisted of
48;;; several files with support for dired commands and other nice
49;;; things. It is currently available from the PAL
50;;; (wuarchive.wustl.edu:/languages/ada) as ada-mode-1.06a.tar.Z.
51;;;
52;;; The probably very first Ada mode (called electric-ada.el) was
53;;; written by Steven D. Litvintchouk and Steven M. Rosen for the
54;;; Gosling Emacs. L. Slater based his development on ada.el and
55;;; electric-ada.el.
56;;;
57;;; The current Ada mode is a complete rewrite by M. Heritsch and
cadd3658 58;;; R. Ebert. Some ideas from the Ada mode mailing list have been
972579f9
RS
59;;; added. Some of the functionality of L. Slater's mode has not
60;;; (yet) been recoded in this new mode. Perhaps you prefer sticking
61;;; to his version.
62
63
f139ce87
KH
64;;; KNOWN BUGS
65;;; ==========
972579f9
RS
66;;;
67;;; In the presence of comments and/or incorrect syntax
68;;; ada-format-paramlist produces weird results.
f139ce87 69;;; -------------------
cadd3658
RS
70;;; Character constants with otherwise syntactic relevant characters
71;;; like `(' or `"' throw indentation off the track. Fontification
72;;; should work now in Emacs-19.35
73;;; C : constant Character := Character'('"');
f139ce87
KH
74;;; -------------------
75
76
cadd3658
RS
77;;; TODO
78;;; ====
79;;;
80;;; o bodify-single-subprogram
81;;; o make a function "separate" and put it in the corresponding file.
82
83
f139ce87
KH
84
85;;; CREDITS
86;;; =======
972579f9 87;;;
f139ce87 88;;; Many thanks to
3746aa55 89;;; Philippe Waroquiers (PW) <philippe@cfmu.eurocontrol.be> in particular,
f139ce87
KH
90;;; woodruff@stc.llnl.gov (John Woodruff)
91;;; jj@ddci.dk (Jesper Joergensen)
92;;; gse@ocsystems.com (Scott Evans)
93;;; comar@LANG8.CS.NYU.EDU (Cyrille Comar)
94;;; and others for their valuable hints.
972579f9 95\f
972579f9
RS
96;;;--------------------
97;;; USER OPTIONS
98;;;--------------------
99
100;; ---- configure indentation
101
102(defvar ada-indent 3
103 "*Defines the size of Ada indentation.")
104
105(defvar ada-broken-indent 2
106 "*# of columns to indent the continuation of a broken line.")
107
108(defvar ada-label-indent -4
109 "*# of columns to indent a label.")
110
111(defvar ada-stmt-end-indent 0
112 "*# of columns to indent a statement end keyword in a separate line.
113Examples are 'is', 'loop', 'record', ...")
114
115(defvar ada-when-indent 3
116 "*Defines the indentation for 'when' relative to 'exception' or 'case'.")
117
118(defvar ada-indent-record-rel-type 3
119 "*Defines the indentation for 'record' relative to 'type' or 'use'.")
120
121(defvar ada-indent-comment-as-code t
5e1cecee 122 "*If non-nil, comment-lines get indented as Ada code.")
972579f9
RS
123
124(defvar ada-indent-is-separate t
5e1cecee 125 "*If non-nil, 'is separate' or 'is abstract' on a single line are indented.")
972579f9
RS
126
127(defvar ada-indent-to-open-paren t
5e1cecee 128 "*If non-nil, indent according to the innermost open parenthesis.")
972579f9 129
f139ce87
KH
130(defvar ada-search-paren-char-count-limit 3000
131 "*Search that many characters for an open parenthesis.")
972579f9
RS
132
133
134;; ---- other user options
135
136(defvar ada-tab-policy 'indent-auto
137 "*Control behaviour of the TAB key.
5e1cecee
RS
138Must be one of `indent-rigidly', `indent-auto', `gei', `indent-af'
139or `always-tab'.
972579f9 140
5e1cecee
RS
141`indent-rigidly' : always adds ada-indent blanks at the beginning of the line.
142`indent-auto' : use indentation functions in this file.
143