]> code.delx.au - gnu-emacs/blobdiff - lisp/ada.el
(while): Comment out converter.
[gnu-emacs] / lisp / ada.el
index bf5eee473b7d0ee90dd090faf26c680a11cb3639..8ee750fc6c0a6aedd7a8f893aedb0c2bc31dec64 100644 (file)
@@ -1,15 +1,15 @@
-; Ada editing support package in GNUlisp.  v1.0
-; Author: Vincent Broman <broman@bugs.nosc.mil>  May 1987.
-; (borrows heavily from Mick Jordan's Modula-2 package for GNU,
-; as modified by Peter Robinson, Michael Schmidt, and Tom Perrine.)
+;;; ada.el --- Ada editing support package in GNUlisp.  v1.0
 
 ;; Copyright (C) 1985, 1986, 1987 Free Software Foundation, Inc.
 
+;; Author: Vincent Broman <broman@bugs.nosc.mil>
+;; Keywords: languages
+
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 1, or (at your option)
+;; the Free Software Foundation; either version 2, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; along with GNU Emacs; see the file COPYING.  If not, write to
 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 
+;;; Commentary:
+
+;; Created May 1987.
+;; (borrows heavily from Mick Jordan's Modula-2 package for GNU,
+;; as modified by Peter Robinson, Michael Schmidt, and Tom Perrine.)
+
+;;; Code:
+
 (setq auto-mode-alist (cons (cons "\\.ada$" 'ada-mode) auto-mode-alist))
 
 (defvar ada-mode-syntax-table nil
 Most control constructs and declarations of Ada can be inserted in the buffer
 by typing Control-C followed by a character mnemonic for the construct.
 
-C-c C-a  array                 C-c b    exception block
-C-c C-e  exception      C-c d    declare block
-C-c C-k  package spec   C-c k    package body
-C-c C-p  procedure spec C-c p    proc/func body
-C-c C-f  func spec      C-c f    for loop
-                        C-c i    if
-                        C-c I    elsif
-                        C-c e    else
-C-c C-v  private        C-c l    loop
-C-c C-r  record         C-c c    case
-C-c C-s  subtype        C-c s    separate
-C-c C-t  type           C-c t    tab spacing for indents
-C-c C-w  when           C-c w    while
-                        C-c x    exit
-C-c (    paired parens  C-c -    inline comment
-                        C-c h    header sec
-C-c C    compile        C-c B    bind
-C-c E    find error list
-C-c L    name library   C-c O    options for bind
-
-C-c < and C-c > move backward and forward respectively to the next line
+\\<ada-mode-map>\\[ada-array] array            \\[ada-exception-block]    exception block
+\\[ada-exception]  exception      \\[ada-declare-block]    declare block
+\\[ada-package-spec]  package spec   \\[ada-package-body]    package body
+\\[ada-procedure-spec]  procedure spec \\[ada-subprogram-body]    proc/func body
+\\[ada-function-spec]  func spec      \\[ada-for-loop]    for loop
+                        \\[ada-if]    if
+                        \\[ada-elsif]    elsif
+                        \\[ada-else]    else
+\\[ada-private]  private        \\[ada-loop]    loop
+\\[ada-record]  record         \\[ada-case]    case
+\\[ada-subtype]  subtype        \\[ada-separate]    separate
+\\[ada-type]  type           \\[ada-tabsize]    tab spacing for indents
+\\[ada-when]  when           \\[ada-while]    while
+                        \\[ada-exit]    exit
+\\[ada-paired-parens]    paired parens  \\[ada-inline-comment]    inline comment
+                        \\[ada-header]    header spec
+\\[ada-compile]    compile        \\[ada-bind]    bind
+\\[ada-find-listing]    find error list
+\\[ada-library-name]    name library   \\[ada-options-for-bind]    options for bind
+
+\\[ada-backward-to-same-indent] and \\[ada-forward-to-same-indent] move backward and forward respectively to the next line
 having the same (or lesser) level of indentation.
 
-Variable ada-indent controls the number of spaces for indent/undent.
-
-\\{ada-mode-map}
-"
+Variable `ada-indent' controls the number of spaces for indent/undent."
   (interactive)
   (kill-all-local-variables)
   (use-local-map ada-mode-map)
@@ -161,16 +166,16 @@ Variable ada-indent controls the number of spaces for indent/undent.
   (setq comment-column 41)
   (make-local-variable 'comment-start-skip)
   (setq comment-start-skip "--+ *")
-  (make-local-variable 'comment-indent-hook)
-  (setq comment-indent-hook 'c-comment-indent)
+  (make-local-variable 'comment-indent-function)
+  (setq comment-indent-function 'c-comment-indent)
   (make-local-variable 'parse-sexp-ignore-comments)
   (setq parse-sexp-ignore-comments t)
   (run-hooks 'ada-mode-hook))
 
 (defun ada-tabsize (s)
   "Changes spacing used for indentation.
-Reads spacing from minibuffer."
-  (interactive "nNew indentation spacing: ")
+The prefix argument is used as the new spacing."
+  (interactive "p")
   (setq ada-indent s))
 
 (defun ada-newline ()
@@ -388,7 +393,7 @@ Indent for the first line of code."
   (ada-tab))
 
 (defun ada-loop ()
-  "Insert a skeleton loop statement.  exit statement added by hand."
+  "Insert a skeleton loop statement.  The exit statement is added by hand."
   (interactive)
   (insert "loop ")
   (let* ((ada-loop-name (read-string "[loop name]: "))
@@ -637,3 +642,5 @@ Initialize the library if a prefix arg is given."
   "Bind the current program library, using the current binding options."
   (interactive)
   (compile (concat "adabind " ada-bind-opts " " ada-lib-dir-name)))
+
+;;; ada.el ends here