;;; 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 ------------------------------------------
(backward-char 1)
(forward-sexp 1)))
(if (looking-at ";")
- (delete-char 1)))
+ (delete-char 1)))
" is" \n
_ \n
< "begin" \n
(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;")