1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-02 20:16:25 +00:00

43 Commits

Author SHA1 Message Date
Stefan Monnier
5dab0769af (ada-mode): Avoid unneeded version checks.
Don't change compile-auto-highlight globally.
Don't bother with `font-lock-defaults' property since XEmacs
also understands the `font-lock-defaults' variable.
Use make-local-variable rather than make-variable-buffer-local.
Don't `defconst' comment-indent-function: keep the default.
Call easy-menu-add unconditionally.
(ada-create-keymap): Use [(shift tab)] so it works on both Emacsen.
(ada-create-menu): Use :included for Emacs as well.
2001-07-16 15:12:19 +00:00
Pavel Janík
3afbc435ac Some fixes to follow coding conventions. 2001-07-16 07:46:48 +00:00
Gerd Moellmann
2be7dabcae Fix license commentary. 2001-07-13 12:59:13 +00:00
Eli Zaretskii
874d799506 Say that the file _is_ part of Emacs. 2001-07-11 10:21:04 +00:00
Dave Love
7c5fd35547 (ada-popup-key): Fix :type. 2001-02-07 23:25:59 +00:00
Dave Love
50a8310e77 (ada-popup-key): Fix last change. 2001-01-12 12:40:28 +00:00
Dave Love
2bef3a39ac (ada-popup-key): Fix :type. 2001-01-09 16:34:51 +00:00
Sam Steingold
eaae8106d7 * simple.el (delete-trailing-whitespace): New interactive function.
* progmodes/ada-mode.el (ada-mode): Use it instead of
`ada-remove-trailing-spaces'
(ada-remove-trailing-spaces): Removed.
* textmodes/two-column.el (2C-merge): Recommend it in the doc.
* textmodes/picture.el (picture-mode-exit): Call it instead of
`picture-clean'.
(picture-clean): Removed.
2000-11-22 20:59:39 +00:00
Stefan Monnier
36144b26b5 (ada-mode): set '' -> setq'. 2000-11-21 22:41:20 +00:00
Dave Love
88127f30ed (ada-mode-menu): Add name to menu map. 2000-10-08 17:47:03 +00:00
Gerd Moellmann
4cc7e49821 Got rid of all byte-compiler warnings on Emacs Load
ada-xref.el before ada-prj.el, so that the Project menu is created
when ada-prj tries to add to it.
(ada-activate-keys-for-case): Suppress the characters that are not
part of the Ada syntax. Better compatibility with else-mode
(ada-adjust-case-interactive): When auto-casing is not active,
correctly insert newlines (used to insert only ^M).  Prevent the
syntax table from being changed in case of an error
(or '_' becomes part of a word and some commands are confused).
Do nothing if ada-auto-case is nil.
(ada-after-keyword-p): Ignore keywords that are also attributes
(ada-batch-reformat): Update usage comment
(ada-call-from-contextual-menu): New function
(ada-case-read-exceptions): Reinitialize the casing exception list
first to nil first, so that the casing exception file can be
shared.
(ada-check-defun-name): Handles "configure" keyword for gnatdist
files.
(ada-compile-goto-error): Fix regexp used to detect a file:line
anywhere in the error message
(ada-contextual-menu-last-point): New variable
(ada-create-keymap): If the variable delete-key-deletes-forward is
t on XEmacs, it means that DEL should delete one character
forward.
(ada-create-menu): Use :included instead of :visible for XEmacs.
New submenu "Options".
(ada-end-stmt-re): Correctly indent "select ... then abort"
statements.
(ada-fill-comment-paragraph): Correctly delete all leading '--'
even if they don't match ada-fill-comment-prefix Fix handling of
paragraphs on the first or last line of a file.
(ada-format-paramlist): Fix handling of default parameter values.
(ada-get-body-name): New function.
(ada-get-current-indent): Optimized by searchling directly for an
existing generic part or a statement outside of it.  Handle
ada-indent-align-comments when indenting comments Replaced some
regexps by testing directly the next character. This results in a
huge speedup on some files.  New indentation scheme for renames
statements.  Stop looking for the 'while' or 'for' associated with
a 'loop' at the first semicolon encountered.  A "return" can also
match an anonymous access subprogram declaration.
(ada-get-indent-noindent): Ignore strings and comments when
looking for the keywords "record" and "private".
(ada-goto-matching-decl-start): When matching "if", make sure we
are not in fact seeing "end if".  Ignore "when" statements except
when initial keyword was "begin".  Fix handling of nested
procedures.  Add a recursive call to this function to skip over
other 'end' statmts.  Fix indentation for "when .. => begin"
(ada-in-open-paren-p): Fix indentation for complex boolean
expressions, where 'and then', 'or else' and parenthesis
statements are mixed up.
(ada-in-paramlist-p): Skip comments while searching for the
beginning Fix handling of operator declarations.
(ada-indent-align-comments): New variable
(ada-indent-current): Change the syntax table only in the
protected section, so that we are sure it is restored correctly.
(ada-indent-on-previous-lines): Use ada-use-indent and
ada-with-indent Correctly indent "select ... then"
(ada-indent-region): Slight speedup.
(ada-indent-renames): New variable.
(ada-last-which-function-subprog, ada-last-which-function-line):
New variables
(ada-looking-at-semi-private): Correctly indent the 'private'
keyword when it is the first word in a package declaration.
(ada-loose-case-word): Stop searching if at the end of the buffer.
(ada-loose-case-word, ada-capitalize-word): Recase the whole word
even if point is not initially at the end of the word.
(ada-matching-decl-start-re): Add "when".
(ada-mode): Add support for abbrev-mode, outline-mode and
which-func-mode Override the old find-file.el entry in
ff-special-constructs since it is using the obsolete
ada-spec-suffix variable
(ada-no-auto-case): New function
(ada-scan-paramlist): When parsing the argument type, accept
spaces (as in "X 'Class", generated by Rational Rose).
(ada-other-file-name): No longer loads the other file.
(ada-popup-menu): Save and restore the current buffer and cursor
position before and after displaying the menu.
(ada-search-ignore-complex-boolean): New function.
(ada-uncomment-region): Emacs21 already knows how to delete
comments not starting in the first column.
(ada-use-indent): New variable
(ada-which-function): New function.
(ada-with-indent): New variable
(ada-xemacs): evaluate it at compile time too, so that ada-mode.el
can be batch-compiled from the command line.
2000-07-24 11:14:26 +00:00
Stefan Monnier
db72f2a606 (ada-mode, ada-create-case-exception): Don't quote lambdas. 2000-05-19 21:40:45 +00:00
Gerd Moellmann
655880d250 Changed format of years in copyright notice. 1999-10-28 11:00:34 +00:00
Gerd Moellmann
7749c1a8cd (ada-get-indent-*, ada-indent-current, ada-goto-*,
ada-indent-newline-indent): Rewritten to support the new indentation
scheme
(ada-case-read-exceptions, ada-create-case-exceptions):
New functions
(ada-fill-comment-paragraph): Add support for the
justification parameter
(ada-make-body, ada-gen-treat-proc,
ada-make-subprogram-body): Rewritten to benefit from the gnatstub
external program
1999-10-07 14:33:10 +00:00
Richard M. Stallman
5e8b779fcb (ada-tmp-directory): Use temporary-file-directory. 1999-08-28 18:25:40 +00:00
Dave Love
b073b657d4 (ada-outline-level): Bind buffer-invisibility-spec. 1999-03-06 19:06:40 +00:00
Richard M. Stallman
8e70c858a7 Record new maintainer. 1999-02-16 03:07:34 +00:00
Richard M. Stallman
f9e6a7e8f5 Fix author's email address. 1998-09-28 09:20:40 +00:00
Karl Heuer
452b228575 (ada-search-ignore-string-comment):
In "found in comment" case, don't beginning-of-line after forward-line.
1998-09-04 19:58:39 +00:00
Simon Marshall
883212ce69 Changed font-lock-reference-face to font-lock-constant-face. 1998-02-20 14:58:27 +00:00
Dave Love
c0b08eb017 Use imenu-case-fold-search. 1997-12-12 17:10:08 +00:00
Richard M. Stallman
c69dd504e5 Finish installing previous change. 1997-06-02 19:58:49 +00:00
Richard M. Stallman
52748d9537 Customize.
(ada-mode): Set up support for find-file.el.
(ada-other-file-alist): New variable moved from find-file.el.
(ada-search-directories): Likewise.
1997-06-02 06:06:03 +00:00
Richard M. Stallman
d03b8a2d00 Comment changes. 1997-05-28 03:50:36 +00:00
Richard M. Stallman
c1bb59cab2 Comment change. 1997-05-23 04:56:15 +00:00
Richard M. Stallman
cadd365812 (ada-krunch-args): Use gnatkr instead of gnatk8.
(ada-make-filename-from-adaname): Ditto.
(ada-adjust-case-region): Use format functionality of message.
(ada-indent-region): Ditto.
(ada-check-matching-start): Ditto.
(ada-check-defun-name): Ditto.

(ada-font-lock-keywords): Default to subdued.  Doc fix.
(ada-font-lock-syntactic-keywords): New variable.
(ada-mode): Use it to set font-lock-defaults.

(ada-font-lock-keywords-2): Single "raise" will be
highlighted. "in out" parameters get type face (depends on order
in regexp).

(ada-mode): Remove explicit setting of user option
`blink-matching-paren', font-lock treats `.' as word char.
(ada-in-string-or-comment-p): Call `parse-partial-sexp' only once.
(ada-untabify-buffer): Force returning `nil'.
(ada-font-lock-keywords-1): Move "task" before "task (body|type)" to
correct highlighting (regexp depends on order).

(ada-in-char-const-p): Renamed from `ada-after-char-p'.
Also test following character.
(ada-adjust-case): Use better function `ada-in-char-const-p'
(ada-in-string-or-comment-p): Test for being in a char constant.
(ada-clean-buffer-before-saving): Changed default to t.
(ada-mode): Set `font-lock-defaults' for Emacs only, use properties
for XEmacs.

(ada-indent-newline-indent): Simplified by just calling
`ada-indent-current'.

(ada-end-stmt-re): Added word delimiters in regexp.
Removed `interactive' statements which were needed only for debugging.

Put format commands back in for emacs 19.30/19.29 compatibility.

(ada-get-indent-label): A named block can begin
without a declare part.
(ada-check-defun-name): First of all, check for correct name in a
named block without `declare' part.
(ada-goto-matching-start): Change regexp as there may be no
semicolon between `end' and keyword.
(ada-get-current-indent): Remove warning as `begin' can introduce
a block without a `declare'.
(ada-goto-matching-decl-start): When searching backward, skip
generic default proc/func ("is <>").

(ada-named-block-re): New regexp for the name of a named block or loop.
(ada-get-current-indent): Handle loop names at the stmt start.
(ada-get-indent-end): Handle loop names at the stmt start.
(ada-get-indent-noindent): Handle loop names at the stmt start.
(ada-get-indent-loop): Handle loop names at the stmt start.
(ada-search-prev-end-stmt): Generic instances are not `stmt-ends'.
(ada-goto-previous-word): Use new function `ada-goto-next-word'.
(ada-goto-next-word): Generalized old `ada-goto-previous-word' for
both directions.

(ada-indent-function): Removed unnecessary `package' case.
(ada-get-indent-case): Before testing for `=>', be sure there is an `is'.
(ada-search-prev-end-stmt): Test for `separate' keyword on the
same line, which is not an `end-stmt'.

(ada-font-lock-keywords-2):
Correct regexp for hilit of unfollowed `end'.
(ada-in-open-paren-p): Start parsing definitely outside of strings.
(ada-gnat-style): New function.

Doc fixes.
(ada-mode): Support new font-lock-mode.
(ada-format-paramlist): Changed all `accept' to `access'.
(ada-insert-paramlist): Changed all `accept' to `access'.
(ada-in-comment-p): Use standard emacs way `parse-partial-sexp'.
(ada-font-lock-keywords-1): Regexps in not byte-compiled code bahave
different than byte-compiled regexps.
Change order of some ored entries.
1997-05-22 01:58:55 +00:00
Karl Heuer
4dd3b39642 (ada-indent-region, ada-check-matching-start, ada-check-defun-name): Fix error
format string.
1996-01-29 23:09:15 +00:00
Karl Heuer
5fb0f713c5 (ada-adjust-case-region, ada-indent-region): Delete format call inside message. 1996-01-25 00:59:05 +00:00
Erik Naggum
b578f267af Update FSF's address. 1996-01-14 07:34:30 +00:00
Karl Heuer
3746aa5590 (ada-case-keyword, ada-auto-case, ada-krunch-args,
ada-call-pretty-printer): Doc fix.
1996-01-04 23:25:15 +00:00
Richard M. Stallman
be01074898 Comment change. 1995-10-30 17:35:01 +00:00
Richard M. Stallman
5e1cecee20 All doc strings changed to comply with standard Emacs conventions.
(ada-mode): Support new font-lock-mode.
(ada-format-paramlist): Changed all `accept' to `access'.
(ada-insert-paramlist): Changed all `accept' to `access'.
(ada-in-comment-p): Use standard Emacs way `parse-partial-sexp'.
(ada-font-lock-keywords-1): Change order of some alternatives.
1995-10-17 03:33:46 +00:00
Erik Naggum
dcf804a0a9 (ada-gen-treat-proc): Bind procname' and functype'. 1995-10-09 03:11:29 +00:00
Karl Heuer
74480345ab (ada-imenu-generic-expression): Var defined.
(ada-mode): Set imenu-generic-expression.
1995-07-28 00:18:42 +00:00
Richard M. Stallman
276c121047 (ada-ident-re): Doc fix.
(ada-end-stmt-re): Corrected serious pb of wrong parentheses.
(ada-subprog-start-re): Removed 'body' from the list.
(ada-format-paramlist): Simplified a regexp.
(ada-indent-current): On first line of the buffer, indent to column 0.
Don't reindent if new position is the same as the old one.  Thus, a
correcly indended line is not modified.
(ada-get-indent-subprog): Simplified a regexp.
(ada-goto-matching-decl-start): Distinguish between normal type
declaration and protected types, which are more like procedures.
(ada-remove-trailing-spaces): Use save-match-data, save-restriction
and widen when removing whitespace.
(ada-font-lock-keywords-1): Add 'pragma' as keyword.
(ada-font-lock-keywords-2): Allow *qualified* idents after 'end'.
1995-07-18 20:48:04 +00:00
Karl Heuer
30ffd6211a Remove version information. 1995-06-02 00:14:33 +00:00
Karl Heuer
f139ce8762 (initial comments): Copyright 1995; don't speak
about setup; correct history for a file that actually IS in
Emacs 19.29; update list of known bugs.
(all functions): inititialize all local variables explicitely to 'nil'.
(ada-font-lock-keywords): initialized according to new user option
`font-lock-maximum-decoration'.

(ada-ident-re): new regexp for Ada identifiers.
(ada-block-start-re): "record" may be preceded by one or more
occurencies of "limited", "abstract", or "tagged".
(ada-end-stmt-re): added "separate" body parts, "else", and
"package <Id> is".
(ada-subprogram-start-re): added "entry", "protected" and
"package body"
(ada-indent-function): handle "elsif" the same way as "if", added
"separate" for no indent.
(ada-get-indent-type): if "type ... is .." is followed by code on
the same line, it is a broken statement. Test it.
(ada-check-defun-name): check for "protected" records.
(ada-goto-matching-decl-start): use of ada-ident-re.
(ada-goto-matching-start): extend regexp for "protected" record.
(ada-in-limit-line): renamed from in-limit-line. Don't use
count-lines, but test if beginning-of-line/end-of-line puts us
to bob/eob.
(ada-goto-previous-nonblank-line): save a beginning-of-line
statement, as we already are there.
(ada-complete-type): removed.
(ada-tabsize): removed.
(keymap): use C-M-a and C-M-e for proc/func movement.  No
keybinding anymore for next/prev-package.
(ada-font-lock-keywords-[1|2]): add protected records. "when" removed
from 'reference'-face.
(initial comments): updated CREDITS list.
(ada-add-ada-menu): capitalized menu entries.  Added menu statement
needed for XEmacs.

changed all Ada94 to Ada95.

(ada-xemacs): new function, detect if we are
running on XEmacs. Ada keymap definition and menus use it.
(ada-create-syntax-table): corrected comments explaining use of 2nd
syntax table.  Added creation of ada-mode-symbol-syntax-table
with '_' as word constituent.
(ada-adjust-case): add test, if symbol is preceeded by a "'".
If true, change case according to ada-case-attribute.
(ada-which-function-are-we-in): new routine. Save name of the current
function in the old buffer; we can place cursor now at the same
function in the new buffer using find-file.
(ada-make-body): new function.  Generates body stubs if the body
did not exist yet and you switch to it by find-file.
(ada-gen-treat-proc): complete rewrite for ada-make-body.
(ada-mode): two doc lines about the above extension.
(keymap definition): remove 4th parameter in call to
`substitute-key-definition' to make XEmacs happy.

(ada-adjust-case-region, ada-move-to-start, ada-move-to-end,
ada-indent-newline-indent, ada-format-paramlist): switch syntax
tables, protect switching of syntax tables with unwind-protect.
(ada-in-open-paren-p): replace user option
`ada-search-paren-line-count-limit' by
`ada-search-paren-char-count-limit'.
(ada-case-attribute): new user option, but not yet the functionality.
(ada-krunch-args): initialized to 0 exploiting the new capability of
'gnatk8' as of gnat-2.0.
(ada-make-filename-from-adaname): remove downcasing and replacement
of dots. This is done in external program gnatk8 (gnat-2.0).
(ada-in-open-paren-p): complete rewrite for speed-up.
(ada-search-ignore-string-comment): ignore # as a string terminator
in all searches.
(ada-add-ada-menu): use real variables instead of t for invoking
'easymenu'
(require 'easymenu).
(imenu-create-ada-index): we accept forward definitions again.
(ada-indent-region): catch errors, simplified code.
1995-05-31 19:30:32 +00:00
Karl Heuer
98e05fae58 (ada-add-ada-menu): Fix args to easy-menu-define. 1995-05-22 21:42:13 +00:00
Karl Heuer
f470f9bd66 Update copyright. 1995-04-07 00:16:13 +00:00
Karl Heuer
3ca7b46f53 Fix comments. 1995-04-04 03:00:59 +00:00
Simon Marshall
c1a644d3ea Use font-lock-maximum-decoration when setting ada-font-lock-keywords 1995-03-02 11:07:44 +00:00
Richard M. Stallman
a681b2a1c5 Add autoload cookie.
(ada-mode-map): Don't define C-m, M-a, M-e, M-q.
Don't define M-q.
(ada-mode): Set fill-paragraph-function locally.
(ada-fill-comment-paragraph): Return t.
(ada-gen-make-bodyfile): Add missing backslash.
1995-02-09 00:17:31 +00:00
Richard M. Stallman
972579f9fe Initial revision 1995-02-09 00:01:34 +00:00