aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2002-04-09 18:55:13 +0000
committerStefan Monnier2002-04-09 18:55:13 +0000
commit18f9934c8ae5605913f2707d12fe1ee80cfa4127 (patch)
tree3f17f3355d37d90de7fc4657cfaddf1e163d6362
parent4884c50b604797005e04c3317e79286314c3fa2e (diff)
downloademacs-18f9934c8ae5605913f2707d12fe1ee80cfa4127.tar.gz
emacs-18f9934c8ae5605913f2707d12fe1ee80cfa4127.zip
Menu changed from Statements to Templates.
(ada-func-or-proc-name): Get real subprogram name, after change in ada-mode.el.
-rw-r--r--lisp/progmodes/ada-stmt.el25
1 files changed, 10 insertions, 15 deletions
diff --git a/lisp/progmodes/ada-stmt.el b/lisp/progmodes/ada-stmt.el
index 3f0ce0771a5..95169476095 100644
--- a/lisp/progmodes/ada-stmt.el
+++ b/lisp/progmodes/ada-stmt.el
@@ -1,9 +1,9 @@
1;;; ada-stmt.el --- an extension to Ada mode for inserting statement templates 1;;; ada-stmt.el --- an extension to Ada mode for inserting statement templates
2 2
3;; Copyright(C) 1987, 1993, 1994, 1996, 1997, 1998, 1999 3;; Copyright(C) 1987, 93, 94, 96, 97, 98, 99, 2000
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Ada Core Technologies's version: $Revision: 1.9 $ 6;; Ada Core Technologies's version: $Revision: 1.21 $
7 7
8;; This file is part of GNU Emacs. 8;; This file is part of GNU Emacs.
9 9
@@ -13,11 +13,8 @@
13;; Rolf Ebert's version: 2.26 13;; Rolf Ebert's version: 2.26
14 14
15;;; Commentary: 15;;; Commentary:
16 16;; This file is now automatically loaded from ada-mode.el, and creates a submenu
17;; 17;; in Ada/ on the menu bar.
18;; put the following statement in your .emacs:
19;; (require 'ada-stmt)
20;;
21 18
22;;; History: 19;;; History:
23 20
@@ -113,14 +110,14 @@
113 ["When" ada-when t]))) 110 ["When" ada-when t])))
114 (if ada-xemacs 111 (if ada-xemacs
115 (funcall (symbol-function 'add-submenu) 112 (funcall (symbol-function 'add-submenu)
116 '("Ada") (append (list "Statements" 113 '("Ada") (append (list "Templates"
117 :included '(string= mode-name "Ada")) 114 :included '(string= mode-name "Ada"))
118 menu)) 115 menu))
119 116
120 (define-key-after (lookup-key ada-mode-map [menu-bar Ada]) [Statements] 117 (define-key-after (lookup-key ada-mode-map [menu-bar Ada]) [Templates]
121 (list 'menu-item 118 (list 'menu-item
122 "Statements" 119 "Templates"
123 (easy-menu-create-menu "Statements" menu) 120 (easy-menu-create-menu "Templates" menu)
124 :visible '(string= mode-name "Ada")) 121 :visible '(string= mode-name "Ada"))
125 t)))) 122 t))))
126 123
@@ -132,7 +129,7 @@
132 (save-excursion 129 (save-excursion
133 (let ((case-fold-search t)) 130 (let ((case-fold-search t))
134 (if (re-search-backward ada-procedure-start-regexp nil t) 131 (if (re-search-backward ada-procedure-start-regexp nil t)
135 (buffer-substring (match-beginning 2) (match-end 2)) 132 (buffer-substring (match-beginning 3) (match-end 3))
136 "NAME?")))) 133 "NAME?"))))
137 134
138(defvar ada-template-map 135(defvar ada-template-map
@@ -236,7 +233,7 @@ Indent for the first line of code."
236(define-skeleton ada-exit 233(define-skeleton ada-exit
237 "Insert an exit statement, prompting for loop name and condition." 234 "Insert an exit statement, prompting for loop name and condition."
238 "[name of loop to exit]: " 235 "[name of loop to exit]: "
239 "exit " str & ?\ (ada-exit-1) | -1 ?\;) 236 "exit " str & ?\ (ada-exit-1) | -1 ?\;)
240 237
241;;;###autoload 238;;;###autoload
242(defun ada-header () 239(defun ada-header ()
@@ -532,7 +529,6 @@ Invoke right after `ada-function-spec' or `ada-procedure-spec'."
532 "[accept name]: " 529 "[accept name]: "
533 > "accept " str 530 > "accept " str
534 (ada-get-param) 531 (ada-get-param)
535;;; " (" ("[parameter_specification]: " str "; ") -2 ")"
536 " do" \n 532 " do" \n
537 > _ \n 533 > _ \n
538 < "end " str ";" ) 534 < "end " str ";" )
@@ -566,7 +562,6 @@ Invoke right after `ada-function-spec' or `ada-procedure-spec'."
566 > "terminate;") 562 > "terminate;")
567 563
568 564
569;; ----
570(defun ada-adjust-case-skeleton () 565(defun ada-adjust-case-skeleton ()
571 "Adjust the case of the text inserted by a skeleton." 566 "Adjust the case of the text inserted by a skeleton."
572 (save-excursion 567 (save-excursion