* progmodes/ada-mode.el (ada-get-indent-end, ada-goto-matching-start):
authorJuanma Barranquero <lekktu@gmail.com>
Sun, 12 Oct 2008 23:06:29 +0000 (23:06 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Sun, 12 Oct 2008 23:06:29 +0000 (23:06 +0000)
  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.

lisp/ChangeLog
lisp/progmodes/ada-mode.el
lisp/progmodes/ada-xref.el

index fc71b0eefa42f2c373fa00d326f39bb150574eed..bbcce20ddb9ac24038f53f139d2e1849302cc9de 100644 (file)
@@ -1,3 +1,11 @@
+2008-10-12  Stephen Leake  <stephen_leake@member.fsf.org>
+
+       * 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.
+
 2008-10-12  Glenn Morris  <rgm@gnu.org>
 
        * Makefile.in (ELCFILES): Update.
index ec5504e471c6020da09e2f7cc1a7660f554e7196..40bbeb9fe41a90b211db40689893ef76fd97be0e 100644 (file)
@@ -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
index d38795658cde0086c56d2d5ecd7a17372515c1ce..1628f461b6cf4c4e9874dee182006601733f1e7f 100644 (file)
@@ -406,8 +406,8 @@ Assumes environment variable ADA_PROJECT_PATH is set properly."
 
          ;; Set properties
          (setq plist (plist-put plist 'gpr_file gpr-file))
-         (setq plist (plist-put plist 'src_dir (reverse src-dir)))
-         (plist-put plist 'obj_dir (reverse obj-dir))
+         (setq plist (plist-put plist 'src_dir src-dir))
+         (plist-put plist 'obj_dir obj-dir)
          )
       (kill-buffer nil)
       (message "Parsing %s ... done" gpr-file)