]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/ada-stmt.el
(ada-func-or-proc-name): Match changes to ada-procedure-start-regexp.
[gnu-emacs] / lisp / progmodes / ada-stmt.el
index 87825b1d6242320fdd0500ba07e5d51dcc23611b..fa6c680779a4fb0f2077f9af9ecff51e6eacfa95 100644 (file)
@@ -1,14 +1,13 @@
 ;;; ada-stmt.el --- an extension to Ada mode for inserting statement templates
 
 ;; Copyright(C) 1987, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-;;              2003, 2004, 2005 Free Software Foundation, Inc.
+;;              2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
 ;; Authors: Daniel Pfeiffer, Markus Heritsch, Rolf Ebert <ebert@waporo.muc.de>
-;; Maintainer: Emmanuel Briot <briot@gnat.com>
+;; Maintainer: Stephen Leake <stephen_leake@stephe-leake.org>
 ;; Keywords: languages, ada
-;; Rolf Ebert's version: 2.26
 
 ;;; Commentary:
 ;; This file is now automatically loaded from ada-mode.el, and creates a submenu
 (require 'ada-mode)
 
 (defun ada-func-or-proc-name ()
-  ;; Get the name of the current function or procedure."
+  "Return the name of the current function or procedure."
   (save-excursion
     (let ((case-fold-search t))
       (if (re-search-backward ada-procedure-start-regexp nil t)
-         (buffer-substring (match-beginning 3) (match-end 3))
+         (match-string 5)
        "NAME?"))))
 
 ;;; ---- statement skeletons ------------------------------------------
@@ -305,7 +304,7 @@ Invoke right after `ada-function-spec' or `ada-procedure-spec'."
        (backward-char 1)
        (forward-sexp 1)))
     (if (looking-at ";")
-        (delete-char 1)))
+       (delete-char 1)))
   " is" \n
    _ \n
    < "begin" \n
@@ -446,21 +445,21 @@ Invoke right after `ada-function-spec' or `ada-procedure-spec'."
 
 
 (define-skeleton ada-or-accept
-  "Insert an or statement, prompting for the condition name."
+  "Insert an accept alternative, prompting for the condition name."
   ()
   < "or\n"
   (ada-accept))
 
 
 (define-skeleton ada-or-delay
-  "Insert a delay statement, prompting for the delay value."
+  "Insert a delay alternative, prompting for the delay value."
   "[delay value]: "
   < "or\n"
   > "delay " str ";")
 
 
 (define-skeleton ada-or-terminate
-  "Insert a terminate statement."
+  "Insert a terminate alternative."
   ()
   < "or\n"
   > "terminate;")