compatibility with GNAT.
(ada-contextual-menu): Menu defined through `easy-menu-define' instead. Various
adjustments to the indentation engine (handling of subtypes, begin blocks,
etc.).
(ada-create-menu): Major rewrite of the handling of menus to use
`easy-menu-define' for cleaner code and better compatibility with XEmacs. All
menus that were previously in ada-xref.el and ada-prj.el are now defined in this
package, which makes it easier to edit menus.
(ada-narrow-to-defun): Add support for `narrow-to-region'. No longer
explicitely load ada-xref.el and ada-prj.el. Use autoload statements instead.
Synchronize with GNAT release 3.15a1.
Do not attempt to load ada-support, which is only for compatibility
with older Emacs versions, and is not needed for Emacs 21.
(ada-continuation-indent): New variable.
New contextual menu: "List local reference", faster than "List References".
(ada-mode): New alignment rules provided by S. Leake.
(ada-mode): Add support for which-function-mode.
Fix various calls to count-lines, that didn't work correctly when the
buffer was narrowed.
(ada-get-current-indent): Fix indentation of named parameter lists and
nested boolean expressions.
(ada-indent-on-previous-lines): Fix indentation of labels.
(ada-search-prev-end-stmt): Fix searching of the previous end-statement,
specially with regards to nested subprograms.
(comment-region advice): Initially disabled, for better compatibility with
other modes.
(ada-fill-comment-paragraph): Fixed (no longer worked with Emacs 21).
* progmodes/ada-xref.el: Update copyright notice.
(ada-xref-create-ali): The default is now not to create automatically the
ALI files by compiling the unit, since this isn't always reliable and
requires an up-to-date project file.
(ada-prj-default-comp-cmd): No longer use gcc directly to compile
a file, but use gnatmake instead, since this gives access to the GNAT
project files.
(ada-xref-search-with-egrep): New variable, suggested by P. Waroquiers.
(ada-load-project-hook): New variable, for support of GNAT project files.
(ada-update-project-menu): Fix the detection of the project file name.
(ada-add-keymap): Change key binding for ada-find-file, that conflicted
with another binding in ada-mode.el.
(ada-add-menu): New menu "List Local References", to list the reference
to the entity only in the current file, instead of looking in the whole
project. Much faster.
(ada-find-references): New parameters arg and local-only.
(ada-find-any-references): New parameters local-only and append.
(ada-goto-declaration): Fix handling of predefined entities in xref.
(ada-get-all-references): Updated to the new xref format in GNAT 3.15,
still compatible with GNAT 3.14 of course. Fix various calls to
count-lines, that didn't work correctly when the buffer was narrowed.
(ada-case-exception-substring): New variable. Casing exceptions can
now also be defined for substrings, in addition to full identifier
names. This provides more flexibility.
(ada-align-list): New function, provide support for align.el in ada-mode.
(ada-procedure-start-regexp): Add support for operators and generic formal
subprograms and packages.
(ada-imenu-comment-re): New variable.
(ada-imenu-generic-expression): Add support for protected types.
(ada-mode): Set comment-start only after running ada-mode-hook, so that the
user can change ada-comment-start in the hook.
Add support for ispell in comments. Add support for align.el.
(ada-save-exception-file, ada-create-case-exception-substring)
(ada-adjust-case-substring): New functions.
(ada-get-current-indent): Properly handles keywords with uppercases.
(ada-goto-matching-end): Rewritten, fixes problems in the handling of
nested blocks.
(ada-untab-hard): Do not touch the contents of comments and strings.
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.
* 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.
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.
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
(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.
(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.
(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'.