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