]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/ada-mode.el
When compiling, require compare-w and skeleton
[gnu-emacs] / lisp / progmodes / ada-mode.el
index 99b4f8659c22a219d92ed41fedc73a97db93ab43..df74b74d73a7c9c31d11b5d8558e6c987ed3a62e 100644 (file)
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
 
-;; Authors: Rolf Ebert      <ebert@inf.enst.fr>
+;; Authors: Rolf Ebert      <re@waporo.muc.de>
 ;;          Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de>
 ;; Keywords: languages oop ada
 ;; Rolf Ebert's version: 2.27
@@ -596,6 +596,7 @@ If you use ada-xref.el:
 
   (make-local-variable 'imenu-generic-expression)
   (setq imenu-generic-expression ada-imenu-generic-expression)
+  (setq imenu-case-fold-search t)
 
   (if (ada-xemacs) nil ; XEmacs uses properties 
     (make-local-variable 'font-lock-defaults)
@@ -605,7 +606,16 @@ If you use ada-xref.el:
             nil t
             ((?\_ . "w")(?\. . "w"))
             beginning-of-line
-            (font-lock-syntactic-keywords . ada-font-lock-syntactic-keywords))))
+            (font-lock-syntactic-keywords . ada-font-lock-syntactic-keywords)))
+
+    ;; Set up support for find-file.el.
+    (make-variable-buffer-local 'ff-other-file-alist)
+    (make-variable-buffer-local 'ff-search-directories)
+    (setq ff-other-file-alist   'ada-other-file-alist
+          ff-search-directories 'ada-search-directories
+          ff-pre-load-hooks     'ff-which-function-are-we-in
+          ff-post-load-hooks    'ff-set-point-accordingly
+          ff-file-created-hooks 'ada-make-body))
 
   (setq major-mode 'ada-mode)
   (setq mode-name "Ada")
@@ -3012,9 +3022,10 @@ This works by two steps:
             (progn
               (re-search-backward "--" nil 1)
               (goto-char (match-beginning 0)))
-          (progn
-            (forward-line 1)
-            (beginning-of-line))))
+         (forward-line 1)
+         ;; Used to have (beginning-of-line) here,
+         ;; but that caused trouble at end of buffer with no newline.
+         ))
        ;;
        ;; found in string => skip it
        ;;
@@ -3787,10 +3798,10 @@ If that is the case remember the name of that function."
     (list (concat "\\<\\(goto\\|raise\\|use\\|with\\)\\>" ; "when" removed
                   ; "[ \t]*\\(\\sw+\\(\\.\\sw*\\)*\\)?") ; RE
                   "[ \t]*\\([a-zA-Z0-9_\\.\\|, ]+\\)\\W")
-          '(1 font-lock-keyword-face) '(2 font-lock-reference-face nil t))
+          '(1 font-lock-keyword-face) '(2 font-lock-constant-face nil t))
     ;;
     ;; Goto tags.
-    '("<<\\(\\sw+\\)>>" 1 font-lock-reference-face)
+    '("<<\\(\\sw+\\)>>" 1 font-lock-constant-face)
     ))
   "Gaudy level highlighting for Ada mode.")