summaryrefslogtreecommitdiff
path: root/lisp/progmodes/ada-mode.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2008-10-12 23:06:29 +0000
committerJuanma Barranquero <lekktu@gmail.com>2008-10-12 23:06:29 +0000
commitdd4fdc44b1143f7959439eecb00d3a79c471a962 (patch)
treec9e0c3e750a900087a5b5b337edba641652074ff /lisp/progmodes/ada-mode.el
parentf6c2397a8584597b92d292b32fe254299216ab05 (diff)
downloademacs-dd4fdc44b1143f7959439eecb00d3a79c471a962.tar.gz
* progmodes/ada-mode.el (ada-get-indent-end, ada-goto-matching-start):
Add support for extended return statement. * progmodes/ada-xref.el (ada-gnat-parse-gpr): Don't reverse src-dir and obj-dir; keep user order.
Diffstat (limited to 'lisp/progmodes/ada-mode.el')
-rw-r--r--lisp/progmodes/ada-mode.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index ec5504e471c..40bbeb9fe41 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -2840,12 +2840,15 @@ ORGPOINT is the limit position used in the calculation."
(forward-word 1)
(ada-goto-next-non-ws)
(cond
- ((looking-at "\\<\\(loop\\|select\\|if\\|case\\)\\>")
+ ;;
+ ;; loop/select/if/case/return
+ ;;
+ ((looking-at "\\<\\(loop\\|select\\|if\\|case\\|return\\)\\>")
(save-excursion (ada-check-matching-start (match-string 0)))
(list (save-excursion (back-to-indentation) (point)) 0))
;;
- ;; loop/select/if/case/record/select
+ ;; record
;;
((looking-at "\\<record\\>")
(save-excursion
@@ -3897,13 +3900,12 @@ If GOTOTHEN is non-nil, point moves to the 'then' following 'if'."
(goto-char (match-beginning 0)))
;;
- ;; found 'do' => skip back to 'accept'
+ ;; found 'do' => skip back to 'accept' or 'return'
;;
((looking-at "do")
(unless (ada-search-ignore-string-comment
- "accept" t nil nil
- 'word-search-backward)
- (error "Missing 'accept' in front of 'do'"))))
+ "\\<accept\\|return\\>" t)
+ (error "Missing 'accept' or 'return' in front of 'do'"))))
(point))
(if noerror