Mercurial > emacs
annotate lisp/progmodes/ada-prj.el @ 112453:06719a229a46 default tip
* calc/calc.el (calc-default-power-reference-level)
(calc-default-field-reference-level): New variables.
* calc/calc-units.el (math-standard-units): Add dB and Np.
(math-logunits): New variable.
(math-extract-logunits, math-logcombine, calcFunc-luplus)
(calcFunc-luminus, calc-luplus, calc-luminus, math-logunit-level)
(calcFunc-fieldlevel, calcFunc-powerlevel, calc-level): New
functions.
(math-find-base-units-rec): Add entry for ln(10).
* calc/calc-help.el (calc-u-prefix-help): Add logarithmic help.
(calc-ul-prefix-help): New function.
* calc/calc-ext.el (calc-init-extensions): Autoload new units
functions. Add keybindings for new units functions.
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Sun, 23 Jan 2011 23:08:04 -0600 |
parents | 417b1e4d63cd |
children |
rev | line source |
---|---|
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
1 ;;; ada-prj.el --- GUI editing of project files for the ada-mode |
25901 | 2 |
79717 | 3 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
112218
376148b31b5e
Add 2011 to FSF/AIST copyright years.
Glenn Morris <rgm@gnu.org>
parents:
106815
diff
changeset
|
4 ;; 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. |
25901 | 5 |
6 ;; Author: Emmanuel Briot <briot@gnat.com> | |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
7 ;; Maintainer: Stephen Leake <stephen_leake@stephe-leake.org> |
25901 | 8 ;; Keywords: languages, ada, project file |
110015
280c8ae2476d
Add "Package:" file headers to denote built-in packages.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
9 ;; Package: ada-mode |
25901 | 10 |
38361
d42c9135a92d
Say that the file _is_ part of Emacs.
Eli Zaretskii <eliz@gnu.org>
parents:
34304
diff
changeset
|
11 ;; This file is part of GNU Emacs. |
25901 | 12 |
94673
52b7a8c22af5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
13 ;; GNU Emacs is free software: you can redistribute it and/or modify |
25901 | 14 ;; it under the terms of the GNU General Public License as published by |
94673
52b7a8c22af5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
15 ;; the Free Software Foundation, either version 3 of the License, or |
52b7a8c22af5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
16 ;; (at your option) any later version. |
25901 | 17 |
38401 | 18 ;; GNU Emacs is distributed in the hope that it will be useful, |
25901 | 19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 ;; GNU General Public License for more details. | |
22 | |
23 ;; You should have received a copy of the GNU General Public License | |
94673
52b7a8c22af5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
24 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
25901 | 25 |
38422
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38401
diff
changeset
|
26 ;;; Commentary: |
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38401
diff
changeset
|
27 |
25901 | 28 ;;; This package provides a set of functions to easily edit the project |
29 ;;; files used by the ada-mode. | |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
30 ;;; The only function publicly available here is `ada-customize'. |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
31 ;;; See the documentation of the Ada mode for more information on the project |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
32 ;;; files. |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
33 ;;; Internally, a project file is represented as a property list, with each |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
34 ;;; field of the project file matching one property of the list. |
25901 | 35 |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
36 |
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
37 ;;; History: |
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
38 ;; |
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
39 |
38422
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38401
diff
changeset
|
40 ;;; Code: |
25901 | 41 |
42 | |
43 ;; ----- Requirements ----------------------------------------------------- | |
44 | |
45 (require 'cus-edit) | |
50738
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
46 (require 'ada-xref) |
25901 | 47 |
50812
15929fed5553
(ada-xemacs): Variable removed, since it's better to use (featurep 'xemacs).
Juanma Barranquero <lekktu@gmail.com>
parents:
50738
diff
changeset
|
48 (eval-when-compile |
15929fed5553
(ada-xemacs): Variable removed, since it's better to use (featurep 'xemacs).
Juanma Barranquero <lekktu@gmail.com>
parents:
50738
diff
changeset
|
49 (require 'ada-mode)) |
15929fed5553
(ada-xemacs): Variable removed, since it's better to use (featurep 'xemacs).
Juanma Barranquero <lekktu@gmail.com>
parents:
50738
diff
changeset
|
50 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
51 ;; ----- Buffer local variables ------------------------------------------- |
25901 | 52 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
53 (defvar ada-prj-current-values nil |
50812
15929fed5553
(ada-xemacs): Variable removed, since it's better to use (featurep 'xemacs).
Juanma Barranquero <lekktu@gmail.com>
parents:
50738
diff
changeset
|
54 "Hold the current value of the fields, This is a property list.") |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
55 (make-variable-buffer-local 'ada-prj-current-values) |
25901 | 56 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
57 (defvar ada-prj-default-values nil |
50812
15929fed5553
(ada-xemacs): Variable removed, since it's better to use (featurep 'xemacs).
Juanma Barranquero <lekktu@gmail.com>
parents:
50738
diff
changeset
|
58 "Hold the default value for the fields, This is a property list.") |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
59 (make-variable-buffer-local 'ada-prj-default-values) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
60 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
61 (defvar ada-prj-ada-buffer nil |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
62 "Indicates what Ada source file was being edited.") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
63 |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
64 (defvar ada-old-cross-prefix nil |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
65 "The cross-prefix associated with the currently loaded runtime library.") |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
66 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
67 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
68 ;; ----- Functions -------------------------------------------------------- |
25901 | 69 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
70 (defun ada-prj-new () |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
71 "Open a new project file." |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
72 (interactive) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
73 (let* ((prj |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
74 (if (and ada-prj-default-project-file |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
75 (not (string= ada-prj-default-project-file ""))) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
76 ada-prj-default-project-file |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
77 "default.adp")) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
78 (filename (read-file-name "Project file: " |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
79 (if prj "" nil) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
80 nil |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
81 nil |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
82 prj))) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
83 (if (not (string= (file-name-extension filename t) ".adp")) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
84 (error "File name extension for project files must be .adp")) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
85 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
86 (ada-customize nil filename))) |
25901 | 87 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
88 (defun ada-prj-edit () |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
89 "Editing the project file associated with the current Ada buffer. |
97078
2f3e251c6e3c
Typo fixes for Ada mode.
Juanma Barranquero <lekktu@gmail.com>
parents:
97058
diff
changeset
|
90 If there is none, opens a new project file." |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
91 (interactive) |
45929
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
92 (if ada-prj-default-project-file |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
93 (ada-customize) |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
94 (ada-prj-new))) |
25901 | 95 |
50738
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
96 (defun ada-prj-initialize-values (symbol ada-buffer filename) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
97 "Set SYMBOL to the property list of the project file FILENAME. |
97078
2f3e251c6e3c
Typo fixes for Ada mode.
Juanma Barranquero <lekktu@gmail.com>
parents:
97058
diff
changeset
|
98 If FILENAME is null, read the file associated with ADA-BUFFER. |
2f3e251c6e3c
Typo fixes for Ada mode.
Juanma Barranquero <lekktu@gmail.com>
parents:
97058
diff
changeset
|
99 If no project file is found, return the default values." |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
100 ;; FIXME: rationalize arguments; make ada-buffer optional? |
50738
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
101 (if (and filename |
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
102 (not (string= filename "")) |
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
103 (assoc filename ada-xref-project-files)) |
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
104 (set symbol (copy-sequence (cdr (assoc filename ada-xref-project-files)))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
105 |
50738
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
106 ;; Set default values (except for the file name if this was given |
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
107 ;; in the buffer |
97110
59b62ec53121
* lisp/ada-prj.el (ada-prj-initialize-values): Fix use of deleted
Juanma Barranquero <lekktu@gmail.com>
parents:
97078
diff
changeset
|
108 (set symbol (ada-default-prj-properties)) |
50738
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
109 (if (and filename (not (string= filename ""))) |
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
110 (set symbol (plist-put (eval symbol) 'filename filename))) |
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
111 )) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
112 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
113 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
114 (defun ada-prj-save-specific-option (field) |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
115 "Return the string to print in the project file to save FIELD. |
97078
2f3e251c6e3c
Typo fixes for Ada mode.
Juanma Barranquero <lekktu@gmail.com>
parents:
97058
diff
changeset
|
116 If the current value of FIELD is the default value, return an empty string." |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
117 (if (string= (plist-get ada-prj-current-values field) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
118 (plist-get ada-prj-default-values field)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
119 "" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
120 (concat (symbol-name field) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
121 "=" (plist-get ada-prj-current-values field) "\n"))) |
25901 | 122 |
123 (defun ada-prj-save () | |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
124 "Save the edited project file." |
25901 | 125 (interactive) |
97058
b6ac850e9d2b
Fix bug #272, and update Ada mode to version 4.0.
Juanma Barranquero <lekktu@gmail.com>
parents:
94673
diff
changeset
|
126 (let ((file-name (or (plist-get ada-prj-current-values 'filename) |
b6ac850e9d2b
Fix bug #272, and update Ada mode to version 4.0.
Juanma Barranquero <lekktu@gmail.com>
parents:
94673
diff
changeset
|
127 (read-file-name "Save project as: "))) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
128 output) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
129 (set 'output |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
130 (concat |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
131 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
132 ;; Save the fields that do not depend on the current buffer |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
133 ;; only if they are different from the default value |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
134 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
135 (ada-prj-save-specific-option 'comp_opt) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
136 (ada-prj-save-specific-option 'bind_opt) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
137 (ada-prj-save-specific-option 'link_opt) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
138 (ada-prj-save-specific-option 'gnatmake_opt) |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
139 (ada-prj-save-specific-option 'gnatfind_opt) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
140 (ada-prj-save-specific-option 'cross_prefix) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
141 (ada-prj-save-specific-option 'remote_machine) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
142 (ada-prj-save-specific-option 'debug_cmd) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
143 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
144 ;; Always save the fields that depend on the current buffer |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
145 "main=" (plist-get ada-prj-current-values 'main) "\n" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
146 "build_dir=" (plist-get ada-prj-current-values 'build_dir) "\n" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
147 (ada-prj-set-list "check_cmd" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
148 (plist-get ada-prj-current-values 'check_cmd)) "\n" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
149 (ada-prj-set-list "make_cmd" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
150 (plist-get ada-prj-current-values 'make_cmd)) "\n" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
151 (ada-prj-set-list "comp_cmd" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
152 (plist-get ada-prj-current-values 'comp_cmd)) "\n" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
153 (ada-prj-set-list "run_cmd" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
154 (plist-get ada-prj-current-values 'run_cmd)) "\n" |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
155 (ada-prj-set-list "src_dir" |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
156 (plist-get ada-prj-current-values 'src_dir) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
157 t) "\n" |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
158 (ada-prj-set-list "obj_dir" |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
159 (plist-get ada-prj-current-values 'obj_dir) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
160 t) "\n" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
161 (ada-prj-set-list "debug_pre_cmd" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
162 (plist-get ada-prj-current-values 'debug_pre_cmd)) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
163 "\n" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
164 (ada-prj-set-list "debug_post_cmd" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
165 (plist-get ada-prj-current-values 'debug_post_cmd)) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
166 "\n" |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
167 )) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
168 |
25901 | 169 (find-file file-name) |
170 (erase-buffer) | |
171 (insert output) | |
172 (save-buffer) | |
173 ;; kill the project buffer | |
174 (kill-buffer nil) | |
175 | |
176 ;; kill the editor buffer | |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
177 (kill-buffer "*Edit Ada Mode Project*") |
25901 | 178 |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
179 ;; automatically set the new project file as the active one |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
180 (set 'ada-prj-default-project-file file-name) |
25901 | 181 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
182 ;; force Emacs to reread the project files |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
183 (ada-reread-prj-file file-name) |
25901 | 184 ) |
185 ) | |
186 | |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
187 (defun ada-prj-load-from-file (symbol) |
97078
2f3e251c6e3c
Typo fixes for Ada mode.
Juanma Barranquero <lekktu@gmail.com>
parents:
97058
diff
changeset
|
188 "Load SYMBOL value from file. |
2f3e251c6e3c
Typo fixes for Ada mode.
Juanma Barranquero <lekktu@gmail.com>
parents:
97058
diff
changeset
|
189 One item per line should be found in the file." |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
190 (save-excursion |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
191 (let ((file (read-file-name "File name: " nil nil t)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
192 (buffer (current-buffer)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
193 line |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
194 list) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
195 (find-file file) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
196 (widen) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
197 (goto-char (point-min)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
198 (while (not (eobp)) |
111433
05dc9dca8729
Replace end-of-line, save-excursion etc with point-at-eol, point-at-bol.
Glenn Morris <rgm@gnu.org>
parents:
110015
diff
changeset
|
199 (set 'line (buffer-substring-no-properties (point) (point-at-eol))) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
200 (add-to-list 'list line) |
111433
05dc9dca8729
Replace end-of-line, save-excursion etc with point-at-eol, point-at-bol.
Glenn Morris <rgm@gnu.org>
parents:
110015
diff
changeset
|
201 (forward-line 1)) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
202 (kill-buffer nil) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
203 (set-buffer buffer) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
204 (set 'ada-prj-current-values |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
205 (plist-put ada-prj-current-values |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
206 symbol |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
207 (append (plist-get ada-prj-current-values symbol) |
111433
05dc9dca8729
Replace end-of-line, save-excursion etc with point-at-eol, point-at-bol.
Glenn Morris <rgm@gnu.org>
parents:
110015
diff
changeset
|
208 (reverse list))))) |
05dc9dca8729
Replace end-of-line, save-excursion etc with point-at-eol, point-at-bol.
Glenn Morris <rgm@gnu.org>
parents:
110015
diff
changeset
|
209 (ada-prj-display-page 2))) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
210 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
211 (defun ada-prj-subdirs-of (dir) |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
212 "Return a list of all the subdirectories of DIR, recursively." |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
213 (let ((subdirs (directory-files dir t "^[^.].*")) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
214 (dirlist (list dir))) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
215 (while subdirs |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
216 (if (file-directory-p (car subdirs)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
217 (let ((sub (ada-prj-subdirs-of (car subdirs)))) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
218 (if sub |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
219 (set 'dirlist (append sub dirlist))))) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
220 (set 'subdirs (cdr subdirs))) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
221 dirlist)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
222 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
223 (defun ada-prj-load-directory (field &optional file-name) |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
224 "Append to FIELD in the current project the subdirectories of FILE-NAME. |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
225 If FILE-NAME is nil, ask the user for the name." |
45929
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
226 |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
227 ;; Do not use an external dialog for this, since it wouldn't allow |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
228 ;; the user to select a directory |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
229 (let ((use-dialog-box nil)) |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
230 (unless file-name |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
231 (set 'file-name (read-file-name "Root directory: " nil nil t)))) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
232 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
233 (set 'ada-prj-current-values |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
234 (plist-put ada-prj-current-values |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
235 field |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
236 (append (plist-get ada-prj-current-values field) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
237 (reverse (ada-prj-subdirs-of |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
238 (expand-file-name file-name)))))) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
239 (ada-prj-display-page 2)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
240 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
241 (defun ada-prj-display-page (tab-num) |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
242 "Display page TAB-NUM in the notebook. |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
243 The current buffer must be the project editing buffer." |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
244 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
245 (let ((inhibit-read-only t)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
246 (erase-buffer)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
247 |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
248 ;; Widget support in Emacs 21 requires that we clear the buffer first |
50812
15929fed5553
(ada-xemacs): Variable removed, since it's better to use (featurep 'xemacs).
Juanma Barranquero <lekktu@gmail.com>
parents:
50738
diff
changeset
|
249 (if (and (not (featurep 'xemacs)) (>= emacs-major-version 21)) |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
250 (progn |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
251 (setq widget-field-new nil |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
252 widget-field-list nil) |
84918
6c8465b69c48
(ada-prj-display-page): Use `mapc' rather than `mapcar'.
Juanma Barranquero <lekktu@gmail.com>
parents:
78234
diff
changeset
|
253 (mapc (lambda (x) (delete-overlay x)) (car (overlay-lists))) |
6c8465b69c48
(ada-prj-display-page): Use `mapc' rather than `mapcar'.
Juanma Barranquero <lekktu@gmail.com>
parents:
78234
diff
changeset
|
254 (mapc (lambda (x) (delete-overlay x)) (cdr (overlay-lists))))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
255 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
256 ;; Display the tabs |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
257 |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
258 (widget-insert "\n Project configuration.\n |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
259 ___________ ____________ ____________ ____________ ____________\n / ") |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
260 (widget-create 'push-button :notify |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
261 (lambda (&rest dummy) (ada-prj-display-page 1)) "General") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
262 (widget-insert " \\ / ") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
263 (widget-create 'push-button :notify |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
264 (lambda (&rest dummy) (ada-prj-display-page 2)) "Paths") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
265 (widget-insert " \\ / ") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
266 (widget-create 'push-button :notify |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
267 (lambda (&rest dummy) (ada-prj-display-page 3)) "Switches") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
268 (widget-insert " \\ / ") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
269 (widget-create 'push-button :notify |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
270 (lambda (&rest dummy) (ada-prj-display-page 4)) "Ada Menu") |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
271 (widget-insert " \\ / ") |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
272 (widget-create 'push-button :notify |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
273 (lambda (&rest dummy) (ada-prj-display-page 5)) "Debugger") |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
274 (widget-insert " \\\n") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
275 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
276 ;; Display the currently selected page |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
277 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
278 (cond |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
279 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
280 ;; |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
281 ;; First page (General) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
282 ;; |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
283 ((= tab-num 1) |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
284 (widget-insert "/ \\/______________\\/______________\\/______________\\/______________\\\n") |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
285 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
286 (widget-insert "Project file name:\n") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
287 (widget-insert (plist-get ada-prj-current-values 'filename)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
288 (widget-insert "\n\n") |
97058
b6ac850e9d2b
Fix bug #272, and update Ada mode to version 4.0.
Juanma Barranquero <lekktu@gmail.com>
parents:
94673
diff
changeset
|
289 (ada-prj-field 'casing "Casing Exceptions" |
b6ac850e9d2b
Fix bug #272, and update Ada mode to version 4.0.
Juanma Barranquero <lekktu@gmail.com>
parents:
94673
diff
changeset
|
290 "List of files that contain casing exception |
b6ac850e9d2b
Fix bug #272, and update Ada mode to version 4.0.
Juanma Barranquero <lekktu@gmail.com>
parents:
94673
diff
changeset
|
291 dictionaries. All these files contain one |
b6ac850e9d2b
Fix bug #272, and update Ada mode to version 4.0.
Juanma Barranquero <lekktu@gmail.com>
parents:
94673
diff
changeset
|
292 identifier per line, with a special casing. |
b6ac850e9d2b
Fix bug #272, and update Ada mode to version 4.0.
Juanma Barranquero <lekktu@gmail.com>
parents:
94673
diff
changeset
|
293 The first file has the highest priority." |
b6ac850e9d2b
Fix bug #272, and update Ada mode to version 4.0.
Juanma Barranquero <lekktu@gmail.com>
parents:
94673
diff
changeset
|
294 t nil |
b6ac850e9d2b
Fix bug #272, and update Ada mode to version 4.0.
Juanma Barranquero <lekktu@gmail.com>
parents:
94673
diff
changeset
|
295 (mapconcat (lambda(x) |
b6ac850e9d2b
Fix bug #272, and update Ada mode to version 4.0.
Juanma Barranquero <lekktu@gmail.com>
parents:
94673
diff
changeset
|
296 (concat " " x)) |
b6ac850e9d2b
Fix bug #272, and update Ada mode to version 4.0.
Juanma Barranquero <lekktu@gmail.com>
parents:
94673
diff
changeset
|
297 (ada-xref-get-project-field 'casing) |
b6ac850e9d2b
Fix bug #272, and update Ada mode to version 4.0.
Juanma Barranquero <lekktu@gmail.com>
parents:
94673
diff
changeset
|
298 "\n") |
b6ac850e9d2b
Fix bug #272, and update Ada mode to version 4.0.
Juanma Barranquero <lekktu@gmail.com>
parents:
94673
diff
changeset
|
299 ) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
300 (ada-prj-field 'main "Executable file name" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
301 "Name of the executable generated when you |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
302 compile your application. This should include |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
303 the full directory name, using ${build_dir} if |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
304 you wish.") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
305 (ada-prj-field 'build_dir "Build directory" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
306 "Reference directory for relative paths in |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
307 src_dir and obj_dir below. This is also the directory |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
308 where the compilation is done.") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
309 (ada-prj-field 'remote_machine "Name of the remote machine (if any)" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
310 "If you want to remotely compile, debug and |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
311 run your application, specify the name of a |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
312 remote machine here. This capability requires |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
313 the 'rsh' protocol on the remote machine.") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
314 (ada-prj-field 'cross_prefix "Prefix used in for the cross tool chain" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
315 "When working on multiple cross targets, it is |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
316 most convenient to specify the prefix of the |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
317 tool chain here. For instance, on PowerPc |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
318 vxworks, you would enter 'powerpc-wrs-vxworks-'. |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
319 To use JGNAT, enter 'j'.") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
320 ) |
25901 | 321 |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
322 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
323 ;; |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
324 ;; Second page (Paths) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
325 ;; |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
326 ((= tab-num 2) |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
327 (if (not (equal (plist-get ada-prj-current-values 'cross_prefix) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
328 ada-old-cross-prefix)) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
329 (progn |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
330 (setq ada-old-cross-prefix |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
331 (plist-get ada-prj-current-values 'cross_prefix)) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
332 (ada-initialize-runtime-library ada-old-cross-prefix))) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
333 |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
334 |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
335 (widget-insert "/_____________\\/ \\/______________\\/______________\\/______________\\\n") |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
336 (ada-prj-field 'src_dir "Source directories" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
337 "Enter the list of directories where your Ada |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
338 sources can be found. These directories will be |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
339 used for the cross-references and for the default |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
340 compilation commands. |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
341 Note that src_dir includes both the build directory |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
342 and the standard runtime." |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
343 t t |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
344 (mapconcat (lambda(x) |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
345 (concat " " x)) |
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
346 ada-xref-runtime-library-specs-path |
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
347 "\n") |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
348 ) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
349 (widget-insert "\n\n") |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
350 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
351 (ada-prj-field 'obj_dir "Object directories" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
352 "Enter the list of directories where the GNAT |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
353 library files (ALI files) can be found. These |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
354 files are used for cross-references and by the |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
355 gnatmake command. |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
356 Note that obj_dir includes both the build directory |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
357 and the standard runtime." |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
358 t t |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
359 (mapconcat (lambda(x) |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
360 (concat " " x)) |
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
361 ada-xref-runtime-library-ali-path |
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
362 "\n") |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
363 ) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
364 (widget-insert "\n\n") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
365 ) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
366 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
367 ;; |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
368 ;; Third page (Switches) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
369 ;; |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
370 ((= tab-num 3) |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
371 (widget-insert "/_____________\\/______________\\/ \\/______________\\/______________\\\n") |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
372 (ada-prj-field 'comp_opt "Switches for the compiler" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
373 "These switches are used in the default |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
374 compilation commands, both for compiling a |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
375 single file and rebuilding the whole project") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
376 (ada-prj-field 'bind_opt "Switches for the binder" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
377 "These switches are used in the default build |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
378 command and are passed to the binder") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
379 (ada-prj-field 'link_opt "Switches for the linker" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
380 "These switches are used in the default build |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
381 command and are passed to the linker") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
382 (ada-prj-field 'gnatmake_opt "Switches for gnatmake" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
383 "These switches are used in the default gnatmake |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
384 command.") |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
385 (ada-prj-field 'gnatfind_opt "Switches for gnatfind" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
386 "The command gnatfind is run every time the Ada/Goto/List_References menu. |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
387 You should for instance add -a if you are working in an environment |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
388 where most ALI files are write-protected, since otherwise they get |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
389 ignored by gnatfind and you don't see the references within.") |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
390 ) |
25901 | 391 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
392 ;; |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
393 ;; Fourth page |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
394 ;; |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
395 ((= tab-num 4) |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
396 (widget-insert "/_____________\\/______________\\/______________\\/ \\/______________\\\n") |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
397 (widget-insert |
97078
2f3e251c6e3c
Typo fixes for Ada mode.
Juanma Barranquero <lekktu@gmail.com>
parents:
97058
diff
changeset
|
398 "All the fields below can use variable substitution. The syntax is ${name}, |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
399 where name is the name that appears after the Help buttons in this buffer. As |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
400 a special case, ${current} is replaced with the name of the file currently |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
401 edited, with directory name but no extension, whereas ${full_current} is |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
402 replaced with the name of the current file with directory name and |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
403 extension.\n") |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
404 (widget-insert |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
405 "The environment variables ADA_INCLUDE_PATH and ADA_OBJECTS_PATH are set to |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
406 ${src_dir} and ${obj_dir} before running the compilation commands, so that you |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
407 don't need to specify the -aI and -aO switches on the command line\n") |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
408 (widget-insert |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
409 "You can reference any environment variable using the same ${...} syntax as |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
410 above, and put the name of the variable between the quotes.\n\n") |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
411 (ada-prj-field 'check_cmd |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
412 "Check syntax of a single file (menu Ada->Check File)" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
413 "This command is run to check the syntax and semantics of a file. |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
414 The file name is added at the end of this command." t) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
415 (ada-prj-field 'comp_cmd |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
416 "Compiling a single file (menu Ada->Compile File)" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
417 "This command is run when the recompilation |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
418 of a single file is needed. The file name is |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
419 added at the end of this command." t) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
420 (ada-prj-field 'make_cmd "Rebuilding the whole project (menu Ada->Build)" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
421 "This command is run when you want to rebuild |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
422 your whole application. It is never issues |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
423 automatically and you will need to ask for it. |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
424 If remote_machine has been set, this command |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
425 will be executed on the remote machine." t) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
426 (ada-prj-field 'run_cmd "Running the application (menu Ada->Run)" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
427 "This command specifies how to run the |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
428 application, including any switch you need to |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
429 specify. If remote_machine has been set, this |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
430 command will be executed on the remote host." t) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
431 ) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
432 |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
433 ;; |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
434 ;; Fifth page |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
435 ;; |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
436 ((= tab-num 5) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
437 (widget-insert "/_____________\\/______________\\/______________\\/______________\\/ \\\n") |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
438 (ada-prj-field 'debug_pre_cmd "Commands to execute before launching the |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
439 debugger" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
440 "The following commands are executed one after the other before starting |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
441 the debugger. These can be used to set up your environment." t) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
442 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
443 (ada-prj-field 'debug_cmd "Debugging the application" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
444 "Specifies how to debug the application, possibly |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
445 remotely if remote_machine has been set. We |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
446 recommend the following debuggers: |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
447 > gdb |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
448 > gvd --tty |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
449 > ddd --tty -fullname -toolbar") |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
450 |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
451 (ada-prj-field 'debug_post_cmd "Commands to execute in the debugger" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
452 "The following commands are executed one in the debugger once it has been |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
453 started. These can be used to initialize the debugger, for instance to |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
454 connect to the target when working with cross-environments" t) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
455 ) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
456 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
457 ) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
458 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
459 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
460 (widget-insert "______________________________________________________________________\n\n ") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
461 (widget-create 'push-button |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
462 :notify (lambda (&rest ignore) |
97110
59b62ec53121
* lisp/ada-prj.el (ada-prj-initialize-values): Fix use of deleted
Juanma Barranquero <lekktu@gmail.com>
parents:
97078
diff
changeset
|
463 (setq ada-prj-current-values (ada-default-prj-properties)) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
464 (ada-prj-display-page 1)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
465 "Reset to Default Values") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
466 (widget-insert " ") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
467 (widget-create 'push-button :notify (lambda (&rest ignore) (kill-buffer nil)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
468 "Cancel") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
469 (widget-insert " ") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
470 (widget-create 'push-button :notify (lambda (&rest ignore) (ada-prj-save)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
471 "Save") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
472 (widget-insert "\n\n") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
473 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
474 (widget-setup) |
64803
126d8b68ff09
(ada-prj-display-page): Use with-no-warnings.
Richard M. Stallman <rms@gnu.org>
parents:
64699
diff
changeset
|
475 (with-no-warnings |
126d8b68ff09
(ada-prj-display-page): Use with-no-warnings.
Richard M. Stallman <rms@gnu.org>
parents:
64699
diff
changeset
|
476 (beginning-of-buffer)) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
477 ) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
478 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
479 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
480 (defun ada-customize (&optional new-file filename) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
481 "Edit the project file associated with the current buffer. |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
482 If there is none or NEW-FILE is non-nil, make a new one. |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
483 If FILENAME is given, edit that file." |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
484 (interactive) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
485 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
486 (let ((ada-buffer (current-buffer)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
487 (inhibit-read-only t)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
488 |
45929
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
489 ;; We can only edit interactively the standard ada-mode project files. If |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
490 ;; the user is using other formats for the project file (through hooks in |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
491 ;; `ada-load-project-hook', we simply edit the file |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
492 |
45929
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
493 (if (and (not new-file) |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
494 (or ada-prj-default-project-file filename) |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
495 (string= (file-name-extension |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
496 (or filename ada-prj-default-project-file)) |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
497 "gpr")) |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
498 (progn |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
499 (find-file ada-prj-default-project-file) |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
500 (add-hook 'after-save-hook 'ada-reread-prj-file t t) |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
501 ) |
25901 | 502 |
50738
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
503 (if filename |
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
504 (ada-reread-prj-file filename) |
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
505 (if (not (string= ada-prj-default-project-file "")) |
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
506 (ada-reread-prj-file ada-prj-default-project-file) |
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
507 (ada-reread-prj-file))) |
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
508 |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
509 (switch-to-buffer "*Edit Ada Mode Project*") |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
510 |
50738
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
511 (ada-prj-initialize-values 'ada-prj-current-values |
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
512 ada-buffer |
1f13d7a73837
(ada-prj-add-keymap): Moved to ada-mode.el directly. Add dependency on
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
513 ada-prj-default-project-file) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
514 |
45929
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
515 (set (make-local-variable 'ada-prj-ada-buffer) ada-buffer) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
516 |
111870
b47e85affa59
Derive from prog-mode, use derived-mode-p, and fix up various
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
111433
diff
changeset
|
517 (use-local-map |
b47e85affa59
Derive from prog-mode, use derived-mode-p, and fix up various
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
111433
diff
changeset
|
518 (let ((map (make-sparse-keymap))) |
b47e85affa59
Derive from prog-mode, use derived-mode-p, and fix up various
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
111433
diff
changeset
|
519 (set-keymap-parent map custom-mode-map) |
b47e85affa59
Derive from prog-mode, use derived-mode-p, and fix up various
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
111433
diff
changeset
|
520 (define-key map "\C-x\C-s" 'ada-prj-save) |
b47e85affa59
Derive from prog-mode, use derived-mode-p, and fix up various
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
111433
diff
changeset
|
521 map)) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
522 |
111870
b47e85affa59
Derive from prog-mode, use derived-mode-p, and fix up various
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
111433
diff
changeset
|
523 ;; FIXME: Not sure if this works!! |
b47e85affa59
Derive from prog-mode, use derived-mode-p, and fix up various
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
111433
diff
changeset
|
524 (set (make-local-variable 'widget-keymap) |
b47e85affa59
Derive from prog-mode, use derived-mode-p, and fix up various
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
111433
diff
changeset
|
525 (let ((map (make-sparse-keymap))) |
b47e85affa59
Derive from prog-mode, use derived-mode-p, and fix up various
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
111433
diff
changeset
|
526 (set-keymap-parent map widget-keymap) |
b47e85affa59
Derive from prog-mode, use derived-mode-p, and fix up various
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
111433
diff
changeset
|
527 (define-key map "\C-x\C-s" 'ada-prj-save) |
b47e85affa59
Derive from prog-mode, use derived-mode-p, and fix up various
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
111433
diff
changeset
|
528 map)) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
529 |
45929
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
530 (set (make-local-variable 'ada-old-cross-prefix) |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
531 (ada-xref-get-project-field 'cross-prefix)) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45929
diff
changeset
|
532 |
45929
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
533 (ada-prj-display-page 1) |
8542d59b76af
Update copyright. Improve `revision' info.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
44468
diff
changeset
|
534 ))) |
25901 | 535 |
536 ;; ---------------- Utilities -------------------------------- | |
537 | |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
538 (defun ada-prj-set-list (string ada-list &optional is-directory) |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
539 "Prepend STRING to strings in ADA-LIST, return new-line separated string. |
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
540 If IS-DIRECTORY is non-nil, each element of ADA-LIST is explicitly |
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
541 converted to a directory name." |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
542 |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
543 (mapconcat (lambda (x) (concat string "=" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
544 (if is-directory |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
545 (file-name-as-directory x) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
546 x))) |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
547 ada-list "\n")) |
25901 | 548 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
549 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
550 (defun ada-prj-field-modified (widget &rest dummy) |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
551 "Callback for modification of WIDGET. |
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
552 Remaining args DUMMY are ignored. |
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
553 Save the change in `ada-prj-current-values' so that selecting |
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
554 another page and coming back keeps the new value." |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
555 (set 'ada-prj-current-values |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
556 (plist-put ada-prj-current-values |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
557 (widget-get widget ':prj-field) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
558 (widget-value widget)))) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
559 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
560 (defun ada-prj-display-help (widget widget-modified event) |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
561 "Callback for help button in WIDGET. |
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
562 Parameters WIDGET-MODIFIED, EVENT match :notify for the widget." |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
563 (let ((text (widget-get widget 'prj-help))) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
564 (if event |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
565 ;; If we have a mouse-event, popup a menu |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
566 (widget-choose "Help" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
567 (mapcar (lambda (a) (cons a t)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
568 (split-string text "\n")) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
569 event) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
570 ;; Else display the help string just before the next group of |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
571 ;; variables |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
572 (momentary-string-display |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
573 (concat "*****Help*****\n" text "\n**************\n") |
111433
05dc9dca8729
Replace end-of-line, save-excursion etc with point-at-eol, point-at-bol.
Glenn Morris <rgm@gnu.org>
parents:
110015
diff
changeset
|
574 (point-at-bol 2))))) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
575 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
576 (defun ada-prj-show-value (widget widget-modified event) |
73565
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
577 "Show the current field value in WIDGET. |
e9cef9a59abe
(ada-prj-new): Change maintainer, apply whitespace-cleanup, checkdoc. Minor
Juanma Barranquero <lekktu@gmail.com>
parents:
68773
diff
changeset
|
578 Parameters WIDGET-MODIFIED, EVENT match :notify for the widget." |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
579 (let* ((field (widget-get widget ':prj-field)) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
580 (value (plist-get ada-prj-current-values field)) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
581 (inhibit-read-only t) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
582 w) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
583 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
584 ;; If the other widget is already visible, delete it |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
585 (if (widget-get widget 'prj-other-widget) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
586 (progn |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
587 (widget-delete (widget-get widget 'prj-other-widget)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
588 (widget-put widget 'prj-other-widget nil) |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
589 (widget-put widget ':prj-field field) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
590 (widget-default-value-set widget "Show Value") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
591 ) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
592 |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
593 ;; Else create it |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
594 (save-excursion |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
595 (mouse-set-point event) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
596 (forward-line 1) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
597 (beginning-of-line) |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
598 (setq w (widget-create 'editable-list |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
599 :entry-format "%i%d %v" |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
600 :notify 'ada-prj-field-modified |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
601 :help-echo (widget-get widget 'prj-help) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
602 :value value |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
603 (list 'editable-field :keymap widget-keymap))) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
604 (widget-put widget 'prj-other-widget w) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
605 (widget-put w ':prj-field field) |
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
606 (widget-put widget ':prj-field field) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
607 (widget-default-value-set widget "Hide Value") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
608 ) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
609 ) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
610 (widget-setup) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
611 )) |
25901 | 612 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
613 (defun ada-prj-field (field text help-text &optional is-list is-paths after-text) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
614 "Create a widget to edit FIELD in the current buffer. |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
615 TEXT is a short explanation of what the field means, whereas HELP-TEXT |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
616 is the text displayed when the user pressed the help button. |
97078
2f3e251c6e3c
Typo fixes for Ada mode.
Juanma Barranquero <lekktu@gmail.com>
parents:
97058
diff
changeset
|
617 If IS-LIST is non-nil, the field contains a list. Otherwise, it contains |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
618 a single string. |
97078
2f3e251c6e3c
Typo fixes for Ada mode.
Juanma Barranquero <lekktu@gmail.com>
parents:
97058
diff
changeset
|
619 If IS-PATHS is true, some special buttons are added to load paths,... |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
620 AFTER-TEXT is inserted just after the widget." |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
621 (let ((value (plist-get ada-prj-current-values field)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
622 (inhibit-read-only t) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
623 widget) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
624 (unless value |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
625 (set 'value |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
626 (if is-list '() ""))) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
627 (widget-insert text) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
628 (widget-insert ":") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
629 (move-to-column 54 t) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
630 (widget-put (widget-create 'push-button |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
631 :notify 'ada-prj-display-help |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
632 "Help") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
633 'prj-help |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
634 help-text) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
635 (widget-insert (concat " (" (symbol-name field) ")\n")) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
636 (if is-paths |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
637 (progn |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
638 (widget-create 'push-button |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
639 :notify |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
640 (list 'lambda '(&rest dummy) '(interactive) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
641 (list 'ada-prj-load-from-file |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
642 (list 'quote field))) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
643 "Load From File") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
644 (widget-insert " ") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
645 (widget-create 'push-button |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
646 :notify |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
647 (list 'lambda '(&rest dummy) '(interactive) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
648 (list 'ada-prj-load-directory |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
649 (list 'quote field))) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
650 "Load Recursive Directory") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
651 (widget-insert "\n ${build_dir}\n"))) |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
652 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
653 (set 'widget |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
654 (if is-list |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
655 (if (< (length value) 15) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
656 (widget-create 'editable-list |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
657 :entry-format "%i%d %v" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
658 :notify 'ada-prj-field-modified |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
659 :help-echo help-text |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
660 :value value |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
661 (list 'editable-field :keymap widget-keymap)) |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
662 |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
663 (let ((w (widget-create 'push-button |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
664 :notify 'ada-prj-show-value |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
665 "Show value"))) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
666 (widget-insert "\n") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
667 (widget-put w 'prj-help help-text) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
668 (widget-put w 'prj-other-widget nil) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
669 w) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
670 ) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
671 (widget-create 'editable-field |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
672 :format "%v" |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
673 :notify 'ada-prj-field-modified |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
674 :help-echo help-text |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
675 :keymap widget-keymap |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
676 value))) |
44468
539150b68126
Add support for the new project file fields:
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
677 (widget-put widget ':prj-field field) |
30410
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
678 (if after-text |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
679 (widget-insert after-text)) |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
680 (widget-insert "\n") |
01ac16657214
Rewritten to show a tabbed-dialog.
Gerd Moellmann <gerd@gnu.org>
parents:
26227
diff
changeset
|
681 )) |
25901 | 682 |
683 | |
684 (provide 'ada-prj) | |
38422
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38401
diff
changeset
|
685 |
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38401
diff
changeset
|
686 ;;; ada-prj.el ends here |