aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/ada-mode.el
Commit message (Collapse)AuthorAgeFilesLines
* * progmodes/ada-mode.el: Update copyright notice.Stefan Monnier2002-06-201-76/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Comment change.Richard M. Stallman2002-04-281-3/+3
|
* (ada-case-exception-file, ada-indent-handle-comment-special): New variables.Stefan Monnier2002-04-091-357/+866
| | | | | | | | | | | | | | | | | | | | (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.
* (ada-initialize-properties, ada-mode): Do not use make-local-hook.Pavel Janík2002-01-081-3/+1
|
* Doc fix.Pavel Janík2001-12-201-2/+2
|
* (ada-add-extensions): Quote regexp specialAndreas Schwab2001-11-151-3/+5
| | | | characters and append anchor to pattern added to auto-mode-alist.
* (ada-fill-comment-prefix): Doc fix.Richard M. Stallman2001-11-141-12/+9
|
* (ada-fill-comment-prefix): GNAT wants 2 spaces.Stefan Monnier2001-11-131-3/+3
|
* (ada-mode): Avoid unneeded version checks.Stefan Monnier2001-07-161-63/+36
| | | | | | | | | | | 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.
* Some fixes to follow coding conventions.Pavel Janík2001-07-161-4/+4
|
* Fix license commentary.Gerd Moellmann2001-07-131-6/+8
|
* Say that the file _is_ part of Emacs.Eli Zaretskii2001-07-111-2/+2
|
* (ada-popup-key): Fix :type.Dave Love2001-02-071-2/+2
|
* (ada-popup-key): Fix last change.Dave Love2001-01-121-2/+3
|
* (ada-popup-key): Fix :type.Dave Love2001-01-091-2/+2
|
* * simple.el (delete-trailing-whitespace): New interactive function.Sam Steingold2000-11-221-48/+37
| | | | | | | | | | * 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-mode): `set '' -> `setq'.Stefan Monnier2000-11-211-190/+190
|
* (ada-mode-menu): Add name to menu map.Dave Love2000-10-081-3/+3
|
* Got rid of all byte-compiler warnings on Emacs LoadGerd Moellmann2000-07-241-1072/+1599
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-mode, ada-create-case-exception): Don't quote lambdas.Stefan Monnier2000-05-191-7/+7
|
* Changed format of years in copyright notice.Gerd Moellmann1999-10-281-614/+539
|
* (ada-get-indent-*, ada-indent-current, ada-goto-*,Gerd Moellmann1999-10-071-2291/+2624
| | | | | | | | | | | | 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-tmp-directory): Use temporary-file-directory.Richard M. Stallman1999-08-281-1/+1
|
* (ada-outline-level): Bind buffer-invisibility-spec.Dave Love1999-03-061-3/+5
|
* Record new maintainer.Richard M. Stallman1999-02-161-0/+1
|
* Fix author's email address.Richard M. Stallman1998-09-281-1/+1
|
* (ada-search-ignore-string-comment):Karl Heuer1998-09-041-3/+4
| | | | In "found in comment" case, don't beginning-of-line after forward-line.
* Changed font-lock-reference-face to font-lock-constant-face.Simon Marshall1998-02-201-2/+2
|
* Use imenu-case-fold-search.Dave Love1997-12-121-0/+1
|
* Finish installing previous change.Richard M. Stallman1997-06-021-1/+10
|
* Customize.Richard M. Stallman1997-06-021-73/+177
| | | | | | (ada-mode): Set up support for find-file.el. (ada-other-file-alist): New variable moved from find-file.el. (ada-search-directories): Likewise.
* Comment changes.Richard M. Stallman1997-05-281-6/+7
|
* Comment change.Richard M. Stallman1997-05-231-1/+1
|
* (ada-krunch-args): Use gnatkr instead of gnatk8.Richard M. Stallman1997-05-221-299/+385
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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-indent-region, ada-check-matching-start, ada-check-defun-name): Fix errorKarl Heuer1996-01-291-14/+5
| | | | format string.
* (ada-adjust-case-region, ada-indent-region): Delete format call inside message.Karl Heuer1996-01-251-3/+3
|
* Update FSF's address.Erik Naggum1996-01-141-2/+3
|
* (ada-case-keyword, ada-auto-case, ada-krunch-args,Karl Heuer1996-01-041-9/+9
| | | | ada-call-pretty-printer): Doc fix.
* Comment change.Richard M. Stallman1995-10-301-1/+1
|
* All doc strings changed to comply with standard Emacs conventions.Richard M. Stallman1995-10-171-89/+109
| | | | | | | | (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-gen-treat-proc): Bind `procname' and `functype'.Erik Naggum1995-10-091-1/+1
|
* (ada-imenu-generic-expression): Var defined.Karl Heuer1995-07-281-0/+11
| | | | (ada-mode): Set imenu-generic-expression.
* (ada-ident-re): Doc fix.Richard M. Stallman1995-07-181-58/+35
| | | | | | | | | | | | | | | | (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'.
* Remove version information.Karl Heuer1995-06-021-6/+0
|
* (initial comments): Copyright 1995; don't speakKarl Heuer1995-05-311-682/+650
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* (ada-add-ada-menu): Fix args to easy-menu-define.Karl Heuer1995-05-221-4/+4
|
* Update copyright.Karl Heuer1995-04-071-4/+4
|
* Fix comments.Karl Heuer1995-04-041-10/+9
|
* Use font-lock-maximum-decoration when setting ada-font-lock-keywordsSimon Marshall1995-03-021-4/+6
|
* Add autoload cookie.Richard M. Stallman1995-02-091-26/+16
| | | | | | | | (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.