]> code.delx.au - gnu-emacs/blobdiff - lisp/ada.el
(dabbrev-case-replace, dabbrev-case-fold-search):
[gnu-emacs] / lisp / ada.el
index 72d00257d787c94d1fb906b969d0bd2bc96967e5..bf7633bf82d47777f2416ba42c5393b31e951d5b 100644 (file)
@@ -88,7 +88,7 @@ This does fairly subdued highlighting.")
 ;    ("abort" "abs" "abstract" "accept" "access" "aliased" "all"
 ;     "and" "array" "at" "begin" "case" "declare" "delay" "delta"
 ;     "digits" "do" "else" "elsif" "entry" "exception" "exit" "for"
-;     "generic" "if" "is" "limited" "loop" "mod" "not"
+;     "generic" "if" "in" "is" "limited" "loop" "mod" "not"
 ;     "null" "or" "others" "private" "protected"
 ;     "range" "record" "rem" "renames" "requeue" "return" "reverse"
 ;     "select" "separate" "tagged" "task" "terminate" "then" "until"
@@ -97,7 +97,7 @@ This does fairly subdued highlighting.")
            "l\\(iased\\|l\\)\\|nd\\|rray\\|t\\)\\|begin\\|case\\|"
            "d\\(e\\(clare\\|l\\(ay\\|ta\\)\\)\\|igits\\|o\\)\\|"
            "e\\(ls\\(e\\|if\\)\\|ntry\\|x\\(ception\\|it\\)\\)\\|for\\|"
-           "generic\\|i[fs]\\|l\\(imited\\|oop\\)\\|mod\\|n\\(ot\\|ull\\)\\|"
+           "generic\\|i[fns]\\|l\\(imited\\|oop\\)\\|mod\\|n\\(ot\\|ull\\)\\|"
            "o\\(r\\|thers\\)\\|pr\\(ivate\\|otected\\)\\|"
            "r\\(ange\\|e\\(cord\\|m\\|names\\|queue\\|turn\\|verse\\)\\)\\|"
            "se\\(lect\\|parate\\)\\|"
@@ -140,7 +140,9 @@ This does fairly subdued highlighting.")
   "For consideration as a value of `ada-font-lock-keywords'.
 This does a lot more highlighting.")
 
-(defvar ada-font-lock-keywords ada-font-lock-keywords-1
+(defvar ada-font-lock-keywords (if font-lock-maximum-decoration
+                                  ada-font-lock-keywords-2
+                                ada-font-lock-keywords-1)
   "Additional expressions to highlight in Ada mode.")
 
 (defvar ada-mode-map nil
@@ -191,7 +193,8 @@ This does a lot more highlighting.")
 
 (defvar ada-indent 4 "*Value is the number of columns to indent in Ada-Mode.")
 
-;;;###autoload
+(defvar ada-comment-end-column)
+
 (defun ada-mode ()
 "This is a mode intended to support program development in Ada.
 Most control constructs and declarations of Ada can be inserted in the buffer
@@ -228,11 +231,11 @@ Variable `ada-indent' controls the number of spaces for indent/undent."
   (setq mode-name "Ada")
   (make-local-variable 'comment-column)
   (setq comment-column 41)
-  (make-local-variable 'end-comment-column)
-  (setq end-comment-column 72)
+  (make-local-variable 'ada-comment-end-column)
+  (setq ada-comment-end-column 72)
   (set-syntax-table ada-mode-syntax-table)
   (make-local-variable 'paragraph-start)
-  (setq paragraph-start (concat "^$\\|" page-delimiter))
+  (setq paragraph-start (concat "$\\|" page-delimiter))
   (make-local-variable 'paragraph-separate)
   (setq paragraph-separate paragraph-start)
   (make-local-variable 'paragraph-ignore-fill-prefix)
@@ -684,7 +687,7 @@ Invoke right after `ada-function-spec' or `ada-procedure-spec'."
 start a new line."
   (interactive)
   (end-of-line)
-  (if (> (current-column) end-comment-column) (newline))
+  (if (> (current-column) ada-comment-end-column) (newline))
   (if (< (current-column) comment-column) (indent-to comment-column))
   (insert " -- "))