1 |
;;; ada-stmt.el --- an extension to Ada mode for inserting statement templates |
;;; ada-stmt.el --- an extension to Ada mode for inserting statement templates |
2 |
|
|
3 |
;; Copyright(C) 1987, 93, 94, 96, 97, 98, 99, 2000 |
;; Copyright(C) 1987, 93, 94, 96, 97, 98, 99, 2000, 2001, 2002 |
4 |
;; Free Software Foundation, Inc. |
;; Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Ada Core Technologies's version: $Revision$ |
;; Ada Core Technologies's version: Revision: 1.21 (GNAT 3.15) |
7 |
|
|
8 |
;; This file is part of GNU Emacs. |
;; This file is part of GNU Emacs. |
9 |
|
|
29 |
;; Nov 1993. Rolf Ebert <ebert@enpc.fr> (RE) Moved the |
;; Nov 1993. Rolf Ebert <ebert@enpc.fr> (RE) Moved the |
30 |
;; skeleton generation into this separate file. The code still is |
;; skeleton generation into this separate file. The code still is |
31 |
;; essentially written by DP |
;; essentially written by DP |
32 |
;; |
;; |
33 |
;; Adapted Jun 1994. Markus Heritsch |
;; Adapted Jun 1994. Markus Heritsch |
34 |
;; <Markus.Heritsch@studbox.uni-stuttgart.de> (MH) |
;; <Markus.Heritsch@studbox.uni-stuttgart.de> (MH) |
35 |
;; added menu bar support for templates |
;; added menu bar support for templates |
114 |
:included '(string= mode-name "Ada")) |
:included '(string= mode-name "Ada")) |
115 |
menu)) |
menu)) |
116 |
|
|
117 |
(define-key-after (lookup-key ada-mode-map [menu-bar Ada]) [Templates] |
(define-key-after (or |
118 |
|
(lookup-key ada-mode-map [menu-bar Ada]) |
119 |
|
(lookup-key ada-mode-map [menu-bar ada])) |
120 |
|
[Templates] |
121 |
(list 'menu-item |
(list 'menu-item |
122 |
"Templates" |
"Templates" |
123 |
(easy-menu-create-menu "Templates" menu) |
(easy-menu-create-menu "Templates" menu) |
432 |
; "Inserts a use clause, prompting for the list of packages used." |
; "Inserts a use clause, prompting for the list of packages used." |
433 |
; "[list of packages used]: " |
; "[list of packages used]: " |
434 |
; "use " str ?\;) |
; "use " str ?\;) |
435 |
|
|
436 |
|
|
437 |
(define-skeleton ada-record |
(define-skeleton ada-record |
438 |
"Insert a skeleton record type declaration." |
"Insert a skeleton record type declaration." |
475 |
" (" ("[discriminant]: " str "; ") ") is\n" |
" (" ("[discriminant]: " str "; ") ") is\n" |
476 |
> "entry " _ \n |
> "entry " _ \n |
477 |
<"end " str ";" ) |
<"end " str ";" ) |
478 |
|
|
479 |
|
|
480 |
(define-skeleton ada-get-param1 |
(define-skeleton ada-get-param1 |
481 |
"Prompt for arguments and if any enclose them in brackets." |
"Prompt for arguments and if any enclose them in brackets." |
556 |
"[delay value]: " |
"[delay value]: " |
557 |
< "or\n" |
< "or\n" |
558 |
> "delay " str ";") |
> "delay " str ";") |
559 |
|
|
560 |
|
|
561 |
(define-skeleton ada-or-terminate |
(define-skeleton ada-or-terminate |
562 |
"Insert a terminate statement." |
"Insert a terminate statement." |