From dd4fdc44b1143f7959439eecb00d3a79c471a962 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sun, 12 Oct 2008 23:06:29 +0000 Subject: [PATCH] * 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. --- lisp/ChangeLog | 8 ++++++++ lisp/progmodes/ada-mode.el | 14 ++++++++------ lisp/progmodes/ada-xref.el | 4 ++-- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fc71b0eefa4..bbcce20ddb9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2008-10-12 Stephen Leake + + * 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 * Makefile.in (ELCFILES): Update. 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 "\\") (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'")))) + "\\" t) + (error "Missing 'accept' or 'return' in front of 'do'")))) (point)) (if noerror diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el index d38795658cd..1628f461b6c 100644 --- a/lisp/progmodes/ada-xref.el +++ b/lisp/progmodes/ada-xref.el @@ -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) -- 2.39.5