Mercurial > emacs
changeset 44467:e34b692b2fa9
Menu changed from Statements to Templates.
(ada-func-or-proc-name): Get real subprogram name, after change in ada-mode.el.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 09 Apr 2002 18:55:13 +0000 |
parents | f200fce92816 |
children | 539150b68126 |
files | lisp/progmodes/ada-stmt.el |
diffstat | 1 files changed, 10 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/ada-stmt.el Tue Apr 09 18:54:20 2002 +0000 +++ b/lisp/progmodes/ada-stmt.el Tue Apr 09 18:55:13 2002 +0000 @@ -1,9 +1,9 @@ ;;; ada-stmt.el --- an extension to Ada mode for inserting statement templates -;; Copyright(C) 1987, 1993, 1994, 1996, 1997, 1998, 1999 +;; Copyright(C) 1987, 93, 94, 96, 97, 98, 99, 2000 ;; Free Software Foundation, Inc. -;; Ada Core Technologies's version: $Revision: 1.9 $ +;; Ada Core Technologies's version: $Revision: 1.21 $ ;; This file is part of GNU Emacs. @@ -13,11 +13,8 @@ ;; Rolf Ebert's version: 2.26 ;;; Commentary: - -;; -;; put the following statement in your .emacs: -;; (require 'ada-stmt) -;; +;; This file is now automatically loaded from ada-mode.el, and creates a submenu +;; in Ada/ on the menu bar. ;;; History: @@ -113,14 +110,14 @@ ["When" ada-when t]))) (if ada-xemacs (funcall (symbol-function 'add-submenu) - '("Ada") (append (list "Statements" + '("Ada") (append (list "Templates" :included '(string= mode-name "Ada")) menu)) - (define-key-after (lookup-key ada-mode-map [menu-bar Ada]) [Statements] + (define-key-after (lookup-key ada-mode-map [menu-bar Ada]) [Templates] (list 'menu-item - "Statements" - (easy-menu-create-menu "Statements" menu) + "Templates" + (easy-menu-create-menu "Templates" menu) :visible '(string= mode-name "Ada")) t)))) @@ -132,7 +129,7 @@ (save-excursion (let ((case-fold-search t)) (if (re-search-backward ada-procedure-start-regexp nil t) - (buffer-substring (match-beginning 2) (match-end 2)) + (buffer-substring (match-beginning 3) (match-end 3)) "NAME?")))) (defvar ada-template-map @@ -236,7 +233,7 @@ (define-skeleton ada-exit "Insert an exit statement, prompting for loop name and condition." "[name of loop to exit]: " - "exit " str & ?\ (ada-exit-1) | -1 ?\;) + "exit " str & ?\ (ada-exit-1) | -1 ?\;) ;;;###autoload (defun ada-header () @@ -532,7 +529,6 @@ "[accept name]: " > "accept " str (ada-get-param) -;;; " (" ("[parameter_specification]: " str "; ") -2 ")" " do" \n > _ \n < "end " str ";" ) @@ -566,7 +562,6 @@ > "terminate;") -;; ---- (defun ada-adjust-case-skeleton () "Adjust the case of the text inserted by a skeleton." (save-excursion