;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:49:53 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/progmodes/ada-prj.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`ada-prj.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(require 'cus-edit)
#@64 Hold the current value of the fields, This is a property list.
(defvar ada-prj-current-values nil (#$ . 646))
(make-variable-buffer-local 'ada-prj-current-values)
#@65 Hold the default value for the fields, This is a property list.
(defvar ada-prj-default-values nil (#$ . 815))
(make-variable-buffer-local 'ada-prj-default-values)
#@50 Indicates what Ada source file was being edited.
(defvar ada-prj-ada-buffer nil (#$ . 985))
#@25 Open a new project file
(defalias 'ada-prj-new #[nil "\303\300p\"\203 \202\f \304\305\306	\205 \307\310\211	%\311\n\312\"\313\230\204& \314\315!\210\316\310\n\"*\207" [ada-prj-prj-file prj filename my-local-variable-if-set-p "default.adp" read-file-name "Project file: " "" nil file-name-extension t ".adp" error "File name extension for project files must be .adp" ada-customize] 6 (#$ . 1083) nil])
#@109 Editing the project file associated with the current Ada buffer.
If there is none, opens a new project file
(defalias 'ada-prj-edit #[nil "\301 \211\203 \302!\210\303 \202 \304 )\207" [file ada-prj-find-prj-file ada-reread-prj-file ada-customize ada-prj-new] 3 (#$ . 1496) nil])
#@150 Add a new submenu to the Ada menu.
The items are added to the menu NAME in map MAP. NAME should be the same
name as was passed to `ada-create-menu'.
(defalias 'ada-prj-add-ada-menu #[nil "\203 \302K\303\304\305#\210\302K\306\307\305#\207\310\311	\312\"\313\314#\210\310\311	\315\"\316\317#\207" [ada-xemacs ada-mode-map add-menu-button ("Ada" "Project") ["Edit" ada-prj-edit t] "Associate" ("Ada" "Project") ["New..." ada-prj-new t] define-key lookup-key [menu-bar Ada Project] [Edit] ("Edit current" . ada-prj-edit) [menu-bar Ada Project] [New] ("New" . ada-prj-new)] 4 (#$ . 1786)])
#@34 Add new keybindings for ada-prj.
(defalias 'ada-prj-add-keymap #[nil "\301\302\303#\207" [ada-mode-map define-key "u" ada-prj-edit] 4 (#$ . 2379)])
#@183 Set SYMBOL to the property list of the project file FILENAME.
If FILENAME is null, read the file associated with ADA-BUFFER. If no
project file is found, returns the default values.
(defalias 'ada-prj-initialize-values #[(symbol ada-buffer &optional filename) "\203 \306!\203 \307 \210\202 \212\nq\210\301L\210)	\2038 	\310\230\2048 \311	\f\"\2038 \312\311	\f\"A!L\202Q \313\n\"\210	\205Q 	\310\230?\205Q \314\315!\300	#L)\207" [filename prj ada-buffer ada-prj-prj-file ada-xref-project-files symbol file-exists-p ada-reread-prj-file "" assoc copy-sequence ada-xref-set-default-prj-values plist-put eval] 5 (#$ . 2536)])
#@141 Returns the string to print in the project file to save FIELD.
If the current value of FIELD is the default value, returns an empty string.
(defalias 'ada-prj-save-specific-option #[(field) "\303	\"\303\n	\"\230\203 \304\207\305	!\306\303	\"\307R\207" [ada-prj-current-values field ada-prj-default-values plist-get "" symbol-name "=" "\n"] 5 (#$ . 3176)])
#@31 Save the edited project file.
(defalias 'ada-prj-save #[nil "\303\304\"\305\301\306\307!\306\310!\306\311!\306\312!\306\313!\306\314!\306\315!\306\316!\306\317!\306\320!\306\321!\322\303\323\"\324Q\325\303\326\"\324Q\327\303\330\"\324Q\331\332\303\333\"\"\324\331\334\303\335\"\"\324\331\336\303\337\"\"\324\260L\210\340\n!\210\341 \210	c\210\342 \210\343\305!\210\343\344!\210\345\346!\nL\210\347\n!*\207" [ada-prj-current-values output file-name plist-get filename nil ada-prj-save-specific-option comp_opt bind_opt link_opt gnatmake_opt cross_prefix remote_machine comp_cmd check_cmd make_cmd run_cmd debug_cmd "main=" main "\n" "main_unit=" main_unit "build_dir=" build_dir ada-prj-set-list "casing" casing "src_dir" src_dir "obj_dir" obj_dir find-file erase-buffer save-buffer kill-buffer "*Customize Ada Mode*" make-local-variable ada-prj-prj-file ada-reread-prj-file] 24 (#$ . 3541) nil])
#@77 Load SYMBOL value from file. One item per line should be found in the file.
(defalias 'ada-prj-load-from-file #[(symbol) "\212\306\307\310\211\311$p\310\211\312!\210~\210eb\210m\2042 \301\313`\212\310\210`)\"L\210\314\300	\"\210\315y\210\202 \316\310!\210\nq\210\304\317\f\320\321\f\"\322!\"#L\210,\323\324!)\207" [list line buffer file ada-prj-current-values symbol read-file-name "File name: " nil t find-file buffer-substring-no-properties add-to-list 1 kill-buffer plist-put append plist-get reverse ada-prj-display-page 2] 8 (#$ . 4453)])
#@63 Returns a list of all the subdirectories of dir, recursively.
(defalias 'ada-prj-subdirs-of #[(dir) "\304\305\306#C\n\203- \307\n@!\203% \310\n@!\211\203$ \301\311	\"L\210)\302\nAL\210\202	 	*\207" [dir dirlist subdirs sub directory-files t "^[^.].*" file-directory-p ada-prj-subdirs-of append] 5 (#$ . 5013)])
#@119 Append the content of FILE-NAME to FIELD in the current project file.
If FILE-NAME is nil, ask the user for the name.
(defalias 'ada-prj-load-directory #[(field &optional file-name) "\204 \300\303\304\305\211\306$L\210\301\307	\n\310\311	\n\"\312\313\314!!!\"#L\210\315\316!\207" [file-name ada-prj-current-values field read-file-name "Root directory: " nil t plist-put append plist-get reverse ada-prj-subdirs-of expand-file-name ada-prj-display-page 2] 10 (#$ . 5337)])
#@179 Display one of the pages available in the notebook. TAB-NUM should have
a value between 1 and the maximum number of pages.
The current buffer must be the project editing buffer.
(defalias 'ada-prj-display-page #[(tab-num) "\305\306 \210)\307\310!\210\311\312\313\314\315$\210\307\316!\210\311\312\313\317\320$\210\307\321!\210\311\312\313\322\323$\210\307\324!\210\311\312\313\325\326$\210\307\327!\210	\330U\203p \307\331!\210\307\332!\210\307\333\n\334\"!\210\307\335!\210\336\337\340\341#\210\336\342\343\344#\210\336\345\346\347#\210\336\350\351\352#\210\336\353\354\355#\210\202\\	\356U\203\241 \307\357!\210\336\360\361\362\305\211\363\364\365#&\210\307\335!\210\336\366\367\370\305\211\363\371\f\365#&\210\307\335!\210\202\\	\372U\203\326 \307\373!\210\336\374\375\376#\210\336\377\201@ \201A #\210\336\201B \201C \201D #\210\336\201E \201F \201G #\210\202\\	\201H U\203\\\307\201I !\210\307\201J !\210\307\201K !\210\307\201L !\210\307\201M !\210\307\201N !\210\307\201O !\210\307\201P !\210\307\201Q !\210\307\201R !\210\307\201S !\210\336\201T \201U \201V #\210\336\201W \201X \201Y #\210\336\201Z \201[ \201\\ #\210\336\201] \201^ \201_ #\210\336\201` \201a \201b #\210\307\201c !\210\311\312\313\201d \201e $\210\307\201f !\210\311\312\313\201g \201h $\210\307\201f !\210\311\312\313\201i \201j $\210\307\335!\210\201k  \210\201l  \207" [inhibit-read-only tab-num ada-prj-current-values ada-xref-runtime-library-specs-path ada-xref-runtime-library-ali-path t erase-buffer widget-insert "\n               Project and Editor configuration.\n\n   ___________    ____________    ____________    ____________\n  / " widget-create push-button :notify #[(&rest dummy) "\300\301!\207" [ada-prj-display-page 1] 2] "General" " \\  /   " #[(&rest dummy) "\300\301!\207" [ada-prj-display-page 2] 2] "Paths" "  \\  / " #[(&rest dummy) "\300\301!\207" [ada-prj-display-page 3] 2] "Switches" " \\  / " #[(&rest dummy) "\300\301!\207" [ada-prj-display-page 4] 2] "Ada Menu" " \\\n" 1 "_/             \\/______________\\/______________\\/______________\\_____\n\n" "Project file name:\n" plist-get filename "\n\n" ada-prj-field main "Executable file name" "Name of the executable generated when you\ncompile your application. This should include\nthe full directory name, using ${build_dir} if\nyou wish." main_unit "File name of the main unit" "Name of the file to pass to the gnatmake command,\nand that will create the executable.\nThis should not include any directory specification." build_dir "Build directory" "Reference directory for relative paths in\nsrc_dir and obj_dir below. This is also the directory\nwhere the compilation is done." remote_machine "Name of the remote machine (if any)" "If you want to remotely compile, debug and\nrun your application, specify the name of a\nremote machine here. This capability requires\nthe 'rsh' protocol on the remote machine." cross_prefix "Prefix used in for the cross tool chain" "When working on multiple cross targets, it is\nmost convenient to specify the prefix of the\ntool chain here. For instance, on PowerPc\nvxworks, you would enter 'powerpc-wrs-vxworks-'.\nTo use JGNAT, enter 'j'." 2 "_/_____________\\/              \\/______________\\/______________\\_____\n\n" src_dir "Source directories" "Enter the list of directories where your Ada\nsources can be found. These directories will be\nused for the cross-references and for the default\ncompilation commands.\nNote that src_dir includes both the build directory\nand the standard runtime." mapconcat #[(x) "\301P\207" [x "           "] 2] "\n" obj_dir "Object directories" "Enter the list of directories where the GNAT\nlibrary files (ALI files) can be found. These\nfiles are used for cross-references and by the\ngnatmake command.\nNote that obj_dir includes both the build directory\nand the standard runtime." #[(x) "\301P\207" [x "           "] 2] 3 "_/_____________\\/______________\\/              \\/______________\\_____\n\n" comp_opt "Switches for the compiler" "These switches are used in the default\ncompilation commands, both for compiling a\nsingle file and rebuilding the whole project" bind_opt "Switches for the binder" "These switches are used in the default build\ncommand and are passed to the binder" link_opt "Switches for the linker" "These switches are used in the default build\ncommand and are passed to the linker" gnatmake_opt "Switches for gnatmake" "These switches are used in the default gnatmake\ncommand." 4 "_/_____________\\/______________\\/______________\\/              \\_____\n\n" "All the fields below can use variable substitution\n" "The syntax is ${name}, where name is the name that\n" "appears after the Help buttons in this buffer.\n" "As a special case, ${current} is replaced with the name\n" "of the file currently edited, with directory name but\n" "no extension.\n\n" "The environment variables ADA_INCLUDE_PATH and ADA_OBJECTS_PATH\n" "are set to ${src_dir} and ${obj_dir} before running the compilation\n" "commands, so that you don't need to specify the -aI and -aO\n" "switches on the command line\n\n" check_cmd "Check syntax of a single file (menu Ada->Check File)" "This command is run to check the syntax and semantics of a file.\nThe file name is added at the end of this command." comp_cmd "Compiling a single file (menu Ada->Compile File)" "This command is run when the recompilation\nof a single file is needed. The file name is\nadded at the end of this command." make_cmd "Rebuilding the whole project (menu Ada->Build)" "This command is run when you want to rebuild\nyour whole application. It is never issues\nautomatically and you will need to ask for it.\nIf remote_machine has been set, this command\nwill be executed on the remote machine." run_cmd "Running the application (menu Ada->Run)" "This command specifies how to run the\napplication, including any switch you need to\nspecify. If remote_machine has been set, this\ncommand will be executed on the remote host." debug_cmd "Debugging the application" "Specifies how to debug the application, possibly\nremotely if remote_machine has been set. We\nrecommend the following debuggers:\n  > gdb\n  > gdbtk\n  > ddd --tty -fullname -toolbar" "______________________________________________________________________\n\n       " #[(&rest ignore) "\301\302\"\210\303\304!\207" [ada-prj-ada-buffer ada-xref-set-default-prj-values ada-prj-current-values ada-prj-display-page 1] 3] "Reset to Default Values" "         " #[(&rest ignore) "\300\301!\207" [kill-buffer nil] 2] "Cancel" #[(&rest ignore) "\300 \207" [ada-prj-save] 1] "Save" widget-setup beginning-of-buffer] 10 (#$ . 5819)])
#@154 Edit the project file associated with the current buffer.
If there is none or NEW-FILE is non-nil, make a new one.
If FILENAME is given, edit that file.
(defalias 'ada-customize #[(&optional new-file filename) "p\305\306 \210\307\310!\210\311 \210\312\313	\"\210\314\315	\n#\210\316\317!	L\210\320\321!!\210\322\323\324\"\210\316\304!\210\325\f\323\324#\210\326\327!*\207" [inhibit-read-only ada-buffer filename custom-mode-map widget-keymap t ada-require-project-file switch-to-buffer "*Customize Ada Mode*" kill-all-local-variables ada-xref-set-default-prj-values ada-prj-default-values ada-prj-initialize-values ada-prj-current-values make-local-variable ada-prj-ada-buffer use-local-map copy-keymap local-set-key "" ada-prj-save define-key ada-prj-display-page 1] 4 (#$ . 12459) nil])
#@117 Join the strings in ADA-DIR-LIST into a single string. Each name is put
on a separate line that begins with STRING.
(defalias 'ada-prj-set-list #[(string ada-dir-list) "\301\302\303#\207" [ada-dir-list mapconcat #[(x) "\302\303	!Q\207" [string x "=" file-name-as-directory] 4] "\n"] 4 (#$ . 13260)])
#@131 Returns the directory/name of the project file for ADA-FILE.
If ADA-FILE is nil, returns the project file for the current buffer.
(defalias 'ada-prj-get-prj-dir #[(&optional ada-file) "\204 \303 \212\304!q\210\305\306!\211\203 \307	!\204! \310!\nP	*\207" [ada-file prj-file ada-project-file-extension buffer-file-name get-file-buffer ada-prj-find-prj-file t file-exists-p file-name-sans-extension] 3 (#$ . 13569)])
#@170 Callback called each time the value of WIDGET is modified. Save the
change in ada-prj-current-values so that selecting another page and coming
back keeps the new value.
(defalias 'ada-prj-field-modified #[(widget &rest dummy) "\300\302\303	\304\"\305	!#L\207" [ada-prj-current-values widget plist-put widget-get prj-field widget-value] 6 (#$ . 13999)])
#@122 An help button in WIDGET was clicked on. The parameters are so that
this function can be used as :notify for the widget.
(defalias 'ada-prj-display-help #[(widget widget-modified event) "\303\304\"\n\203 \305\306\307\310\311	\312\"\"\n#\202& \313\314	\315Q\212\316y\210\317 \210`)\")\207" [widget text event widget-get prj-help widget-choose "Help" mapcar #[(a) "\301B\207" [a t] 2] split-string "\n" momentary-string-display "*****Help*****\n" "\n**************\n" nil beginning-of-line] 7 (#$ . 14360)])
(defalias 'ada-prj-show-value #[(widget widget-modified event) "\306\307	\310\"\"\311\307	\312\"\203& \313\307	\312\"!\210\314	\312\315#\210\316	\317\"\210\202O \212\320\f!\210\321y\210\322 \210\314	\312\323\324\325\326\327\330\331\307	\332\"\333\334\335E&\n#\210\316	\336\"\210)\337 *\207" [ada-prj-current-values widget inhibit-read-only value event widget-keymap plist-get widget-get prj-field t prj-other-widget widget-delete widget-put nil widget-default-value-set "Show Value" mouse-set-point 1 beginning-of-line widget-create editable-list :entry-format "%i%d %v" :notify ada-prj-field-modified :help-echo prj-help :value editable-field :keymap "Hide Value" widget-setup] 16])
#@392 Create a widget to edit FIELD in the current buffer.
TEXT is a short explanation of what the field means, whereas HELP-TEXT
is the text displayed when the user pressed the help button.
If IS-LIST is non-nil, the field contains a list. Otherwise, it contains
a single string.
if IS-PATHS is true, some special buttons are added to load paths,...
AFTER-TEXT is inserted just after the widget.
(defalias 'ada-prj-field #[(field text help-text &optional is-list is-paths after-text) "\306	\"\307\310\211\204 \304?\205 \311L\210\3124!\210\312\313!\210\314\315\307\"\210\316\317\320\321\322\323$\3245#\210\312\325\326	!\327Q!\2106\203d \317\320\321\330\331\332\333\334	DDF\335$\210\312\336!\210\317\320\321\330\337\340\341\334	DDF\342$\210\312\343!\210\302\203\255 \fG\344W\203\205 \317\345\346\347\321\350\3515\352\f\353\3547E&\n\202\274 \317\320\321\355\356$8\312\357!\210\3168\360	#\210\3168\3245#\210\3168\361\310#\2108)\202\274 \317\353\362\363\321\350\3515\3547\f&\nL\210\316\n\360	#\2109\203\316 \3129!\210\312\357!+\207" [ada-prj-current-values field widget inhibit-read-only value is-list plist-get t nil "" widget-insert ":" move-to-column 54 widget-put widget-create push-button :notify ada-prj-display-help "Help" prj-help "  (" symbol-name ")\n" lambda (&rest dummy) (interactive) ada-prj-load-from-file quote "Load From File" "      " (&rest dummy) (interactive) ada-prj-load-directory "Load Recursive Directory" "\n           ${build_dir}\n" 15 editable-list :entry-format "%i%d %v" ada-prj-field-modified :help-echo :value editable-field :keymap ada-prj-show-value "Show value" "\n" prj-field prj-other-widget :format "%v" text help-text is-paths widget-keymap w after-text] 15 (#$ . 15566)])
(byte-code "\300 \210\301 \210\302\303!\207" [ada-prj-add-keymap ada-prj-add-ada-menu provide ada-prj] 2)
