changeset 74002:5909c257c4ea

(ada-mode-version): Bump version. (ada-create-keymap): Add \C-c\C-m 'ada-set-main-compile-application. (ada-create-menu): Add ada-set-main-compile-application, ada-show-current-main, ada-show-current-project.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 14 Nov 2006 16:13:39 +0000
parents 871131fc9087
children a62f860a2d9e
files lisp/progmodes/ada-mode.el
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/ada-mode.el	Tue Nov 14 15:34:15 2006 +0000
+++ b/lisp/progmodes/ada-mode.el	Tue Nov 14 16:13:39 2006 +0000
@@ -149,7 +149,7 @@
 (defun ada-mode-version ()
   "Return Ada mode version."
   (interactive)
-  (let ((version-string "3.6w"))
+  (let ((version-string "3.7"))
     (if (interactive-p)
 	(message version-string)
       version-string)))
@@ -472,6 +472,7 @@
   "Syntax table for Ada, where `_' is a word constituent.")
 
 (eval-when-compile
+  ;; These values are used in eval-when-compile expressions.
   (defconst ada-83-string-keywords
     '("abort" "abs" "accept" "access" "all" "and" "array" "at" "begin"
       "body" "case" "constant" "declare" "delay" "delta" "digits" "do"
@@ -1344,12 +1345,6 @@
   (setq local-abbrev-table ada-mode-abbrev-table)
 
   ;;  Support for which-function mode
-  ;; which-function-mode does not work with nested subprograms, since it is
-  ;; based only on the regexps generated by imenu, and thus can only detect the
-  ;; beginning of subprograms, not the end.
-  ;; Fix is: redefine a new function ada-which-function, and call it when the
-  ;; major-mode is ada-mode.
-
   (make-local-variable 'which-func-functions)
   (setq which-func-functions '(ada-which-function))
 
@@ -4622,6 +4617,7 @@
   (define-key ada-mode-map "\C-cc"     'ada-change-prj)
   (define-key ada-mode-map "\C-cd"     'ada-set-default-project-file)
   (define-key ada-mode-map "\C-cg"     'ada-gdb-application)
+  (define-key ada-mode-map "\C-c\C-m"  'ada-set-main-compile-application)
   (define-key ada-mode-map "\C-cr"     'ada-run-application)
   (define-key ada-mode-map "\C-c\C-o"  'ada-goto-parent)
   (define-key ada-mode-map "\C-c\C-r"  'ada-find-references)
@@ -4706,11 +4702,14 @@
 	      :included (fboundp 'customize-group)]
 	     ["Check file"    ada-check-current   t]
 	     ["Compile file"  ada-compile-current t]
+	     ["Set main and Build" ada-set-main-compile-application t]
+	     ["Show main" ada-show-current-main t]
 	     ["Build"         ada-compile-application t]
 	     ["Run"           ada-run-application     t]
 	     ["Debug"         ada-gdb-application (eq ada-which-compiler 'gnat)]
 	     ["------"        nil nil]
 	     ("Project"
+	      ["Show project" ada-show-current-project t]
 	      ["Load..."      ada-set-default-project-file t]
 	      ["New..."       ada-prj-new                  t]
 	      ["Edit..."      ada-prj-edit                 t])
@@ -5533,6 +5532,8 @@
 (autoload 'ada-set-default-project-file     "ada-xref" nil nil)
 (autoload 'ada-set-default-project-file     "ada-xref" nil t)
 (autoload 'ada-xref-goto-previous-reference "ada-xref" nil t)
+(autoload 'ada-set-main-compile-application "ada-xref" nil t)
+(autoload 'ada-show-current-main            "ada-xref" nil t)
 
 (autoload 'ada-customize                    "ada-prj"  nil t)
 (autoload 'ada-prj-edit                     "ada-prj"  nil t)