1 |
;;; ada-prj.el --- easy editing of project files for the ada-mode |
;;; ada-prj.el --- easy editing of project files for the ada-mode |
2 |
|
|
3 |
;; Copyright (C) 1998, 1999 Free Software Foundation, Inc. |
;; Copyright (C) 1998, 99, 2000, 2001 Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Author: Emmanuel Briot <briot@gnat.com> |
;; Author: Emmanuel Briot <briot@gnat.com> |
6 |
;; Ada Core Technologies's version: $Revision$ |
;; Ada Core Technologies's version: $Revision$ |
53 |
(defvar ada-prj-ada-buffer nil |
(defvar ada-prj-ada-buffer nil |
54 |
"Indicates what Ada source file was being edited.") |
"Indicates what Ada source file was being edited.") |
55 |
|
|
56 |
|
(defvar ada-old-cross-prefix nil |
57 |
|
"The cross-prefix associated with the currently loaded runtime library.") |
58 |
|
|
59 |
|
|
60 |
;; ----- Functions -------------------------------------------------------- |
;; ----- Functions -------------------------------------------------------- |
61 |
|
|
63 |
"Open a new project file" |
"Open a new project file" |
64 |
(interactive) |
(interactive) |
65 |
(let* ((prj |
(let* ((prj |
66 |
(if (my-local-variable-if-set-p 'ada-prj-prj-file (current-buffer)) |
(if (and ada-prj-default-project-file |
67 |
ada-prj-prj-file |
(not (string= ada-prj-default-project-file ""))) |
68 |
|
ada-prj-default-project-file |
69 |
"default.adp")) |
"default.adp")) |
70 |
(filename (read-file-name "Project file: " |
(filename (read-file-name "Project file: " |
71 |
(if prj "" nil) |
(if prj "" nil) |
88 |
(ada-customize)) |
(ada-customize)) |
89 |
(ada-prj-new)))) |
(ada-prj-new)))) |
90 |
|
|
|
(defun ada-prj-add-ada-menu () |
|
|
"Add a new submenu to the Ada menu. |
|
|
The items are added to the menu NAME in map MAP. NAME should be the same |
|
|
name as was passed to `ada-create-menu'." |
|
|
(if ada-xemacs |
|
|
(progn |
|
|
(funcall (symbol-function 'add-menu-button) |
|
|
'("Ada" "Project") |
|
|
["Edit" ada-prj-edit t] "Associate") |
|
|
(funcall (symbol-function 'add-menu-button) |
|
|
'("Ada" "Project") |
|
|
["New..." ada-prj-new t] "Associate")) |
|
|
(define-key (lookup-key ada-mode-map [menu-bar Ada Project]) |
|
|
[Edit] '("Edit current" . ada-prj-edit)) |
|
|
(define-key (lookup-key ada-mode-map [menu-bar Ada Project]) |
|
|
[New] '("New" . ada-prj-new)))) |
|
|
|
|
91 |
(defun ada-prj-add-keymap () |
(defun ada-prj-add-keymap () |
92 |
"Add new keybindings for ada-prj." |
"Add new keybindings for ada-prj." |
93 |
(define-key ada-mode-map "\C-cu" 'ada-prj-edit)) |
(define-key ada-mode-map "\C-cu" 'ada-prj-edit)) |
104 |
(if (file-exists-p filename) |
(if (file-exists-p filename) |
105 |
(ada-reread-prj-file)) |
(ada-reread-prj-file)) |
106 |
|
|
107 |
;; Else use the one from the current buffer |
;; Else use the active one |
108 |
(save-excursion |
(set 'prj ada-prj-default-project-file)) |
|
(set-buffer ada-buffer) |
|
|
(set 'prj ada-prj-prj-file))) |
|
109 |
|
|
110 |
|
|
111 |
(if (and prj |
(if (and prj |
145 |
(ada-prj-save-specific-option 'bind_opt) |
(ada-prj-save-specific-option 'bind_opt) |
146 |
(ada-prj-save-specific-option 'link_opt) |
(ada-prj-save-specific-option 'link_opt) |
147 |
(ada-prj-save-specific-option 'gnatmake_opt) |
(ada-prj-save-specific-option 'gnatmake_opt) |
148 |
|
(ada-prj-save-specific-option 'gnatfind_opt) |
149 |
(ada-prj-save-specific-option 'cross_prefix) |
(ada-prj-save-specific-option 'cross_prefix) |
150 |
(ada-prj-save-specific-option 'remote_machine) |
(ada-prj-save-specific-option 'remote_machine) |
|
(ada-prj-save-specific-option 'comp_cmd) |
|
|
(ada-prj-save-specific-option 'check_cmd) |
|
|
(ada-prj-save-specific-option 'make_cmd) |
|
|
(ada-prj-save-specific-option 'run_cmd) |
|
151 |
(ada-prj-save-specific-option 'debug_cmd) |
(ada-prj-save-specific-option 'debug_cmd) |
152 |
|
|
153 |
;; Always save the fields that depend on the current buffer |
;; Always save the fields that depend on the current buffer |
154 |
(concat "main=" (plist-get ada-prj-current-values 'main) "\n") |
"main=" (plist-get ada-prj-current-values 'main) "\n" |
155 |
(concat "main_unit=" (plist-get ada-prj-current-values 'main_unit) "\n") |
"main_unit=" (plist-get ada-prj-current-values 'main_unit) "\n" |
156 |
(concat "build_dir=" (plist-get ada-prj-current-values 'build_dir) "\n") |
"build_dir=" (plist-get ada-prj-current-values 'build_dir) "\n" |
157 |
|
(ada-prj-set-list "check_cmd" |
158 |
(ada-prj-set-list "casing" |
(plist-get ada-prj-current-values 'check_cmd)) "\n" |
159 |
(plist-get ada-prj-current-values 'casing)) "\n" |
(ada-prj-set-list "make_cmd" |
160 |
|
(plist-get ada-prj-current-values 'make_cmd)) "\n" |
161 |
|
(ada-prj-set-list "comp_cmd" |
162 |
|
(plist-get ada-prj-current-values 'comp_cmd)) "\n" |
163 |
|
(ada-prj-set-list "run_cmd" |
164 |
|
(plist-get ada-prj-current-values 'run_cmd)) "\n" |
165 |
(ada-prj-set-list "src_dir" |
(ada-prj-set-list "src_dir" |
166 |
(plist-get ada-prj-current-values 'src_dir)) "\n" |
(plist-get ada-prj-current-values 'src_dir) |
167 |
|
t) "\n" |
168 |
(ada-prj-set-list "obj_dir" |
(ada-prj-set-list "obj_dir" |
169 |
(plist-get ada-prj-current-values 'obj_dir)) "\n" |
(plist-get ada-prj-current-values 'obj_dir) |
170 |
|
t) "\n" |
171 |
|
(ada-prj-set-list "debug_pre_cmd" |
172 |
|
(plist-get ada-prj-current-values 'debug_pre_cmd)) |
173 |
|
"\n" |
174 |
|
(ada-prj-set-list "debug_post_cmd" |
175 |
|
(plist-get ada-prj-current-values 'debug_post_cmd)) |
176 |
|
"\n" |
177 |
)) |
)) |
178 |
|
|
179 |
(find-file file-name) |
(find-file file-name) |
186 |
;; kill the editor buffer |
;; kill the editor buffer |
187 |
(kill-buffer "*Customize Ada Mode*") |
(kill-buffer "*Customize Ada Mode*") |
188 |
|
|
189 |
;; automatically associates the current buffer with the |
;; automatically set the new project file as the active one |
190 |
;; new project file |
(set 'ada-prj-default-project-file file-name) |
|
(set (make-local-variable 'ada-prj-prj-file) file-name) |
|
191 |
|
|
192 |
;; force Emacs to reread the project files |
;; force Emacs to reread the project files |
193 |
(ada-reread-prj-file file-name) |
(ada-reread-prj-file file-name) |
255 |
(let ((inhibit-read-only t)) |
(let ((inhibit-read-only t)) |
256 |
(erase-buffer)) |
(erase-buffer)) |
257 |
|
|
258 |
|
;; Widget support in Emacs 21 requires that we clear the buffer first |
259 |
|
(if (and (not (boundp 'running-xemacs)) (>= emacs-major-version 21)) |
260 |
|
(progn |
261 |
|
(setq widget-field-new nil |
262 |
|
widget-field-list nil) |
263 |
|
(mapcar (lambda (x) (delete-overlay x)) (car (overlay-lists))) |
264 |
|
(mapcar (lambda (x) (delete-overlay x)) (cdr (overlay-lists))))) |
265 |
|
|
266 |
;; Display the tabs |
;; Display the tabs |
267 |
|
|
268 |
(widget-insert "\n Project and Editor configuration.\n |
(widget-insert "\n Project and Editor configuration.\n |
269 |
___________ ____________ ____________ ____________\n / ") |
___________ ____________ ____________ ____________ ____________\n / ") |
270 |
(widget-create 'push-button :notify |
(widget-create 'push-button :notify |
271 |
(lambda (&rest dummy) (ada-prj-display-page 1)) "General") |
(lambda (&rest dummy) (ada-prj-display-page 1)) "General") |
272 |
(widget-insert " \\ / ") |
(widget-insert " \\ / ") |
278 |
(widget-insert " \\ / ") |
(widget-insert " \\ / ") |
279 |
(widget-create 'push-button :notify |
(widget-create 'push-button :notify |
280 |
(lambda (&rest dummy) (ada-prj-display-page 4)) "Ada Menu") |
(lambda (&rest dummy) (ada-prj-display-page 4)) "Ada Menu") |
281 |
|
(widget-insert " \\ / ") |
282 |
|
(widget-create 'push-button :notify |
283 |
|
(lambda (&rest dummy) (ada-prj-display-page 5)) "Debugger") |
284 |
(widget-insert " \\\n") |
(widget-insert " \\\n") |
285 |
|
|
286 |
;; Display the currently selected page |
;; Display the currently selected page |
291 |
;; First page (General) |
;; First page (General) |
292 |
;; |
;; |
293 |
((= tab-num 1) |
((= tab-num 1) |
294 |
(widget-insert "_/ \\/______________\\/______________\\/______________\\_____\n\n") |
(widget-insert "/ \\/______________\\/______________\\/______________\\/______________\\\n") |
295 |
|
|
296 |
(widget-insert "Project file name:\n") |
(widget-insert "Project file name:\n") |
297 |
(widget-insert (plist-get ada-prj-current-values 'filename)) |
(widget-insert (plist-get ada-prj-current-values 'filename)) |
338 |
;; Second page (Paths) |
;; Second page (Paths) |
339 |
;; |
;; |
340 |
((= tab-num 2) |
((= tab-num 2) |
341 |
(widget-insert "_/_____________\\/ \\/______________\\/______________\\_____\n\n") |
(if (not (equal (plist-get ada-prj-current-values 'cross_prefix) |
342 |
|
ada-old-cross-prefix)) |
343 |
|
(progn |
344 |
|
(setq ada-old-cross-prefix |
345 |
|
(plist-get ada-prj-current-values 'cross_prefix)) |
346 |
|
(ada-initialize-runtime-library ada-old-cross-prefix))) |
347 |
|
|
348 |
|
|
349 |
|
(widget-insert "/_____________\\/ \\/______________\\/______________\\/______________\\\n") |
350 |
(ada-prj-field 'src_dir "Source directories" |
(ada-prj-field 'src_dir "Source directories" |
351 |
"Enter the list of directories where your Ada |
"Enter the list of directories where your Ada |
352 |
sources can be found. These directories will be |
sources can be found. These directories will be |
356 |
and the standard runtime." |
and the standard runtime." |
357 |
t t |
t t |
358 |
(mapconcat (lambda(x) |
(mapconcat (lambda(x) |
359 |
(concat " " x)) |
(concat " " x)) |
360 |
ada-xref-runtime-library-specs-path |
ada-xref-runtime-library-specs-path |
361 |
"\n") |
"\n") |
362 |
) |
) |
363 |
(widget-insert "\n\n") |
(widget-insert "\n\n") |
364 |
|
|
371 |
and the standard runtime." |
and the standard runtime." |
372 |
t t |
t t |
373 |
(mapconcat (lambda(x) |
(mapconcat (lambda(x) |
374 |
(concat " " x)) |
(concat " " x)) |
375 |
ada-xref-runtime-library-ali-path |
ada-xref-runtime-library-ali-path |
376 |
"\n") |
"\n") |
377 |
) |
) |
378 |
(widget-insert "\n\n") |
(widget-insert "\n\n") |
379 |
) |
) |
382 |
;; Third page (Switches) |
;; Third page (Switches) |
383 |
;; |
;; |
384 |
((= tab-num 3) |
((= tab-num 3) |
385 |
(widget-insert "_/_____________\\/______________\\/ \\/______________\\_____\n\n") |
(widget-insert "/_____________\\/______________\\/ \\/______________\\/______________\\\n") |
386 |
(ada-prj-field 'comp_opt "Switches for the compiler" |
(ada-prj-field 'comp_opt "Switches for the compiler" |
387 |
"These switches are used in the default |
"These switches are used in the default |
388 |
compilation commands, both for compiling a |
compilation commands, both for compiling a |
396 |
(ada-prj-field 'gnatmake_opt "Switches for gnatmake" |
(ada-prj-field 'gnatmake_opt "Switches for gnatmake" |
397 |
"These switches are used in the default gnatmake |
"These switches are used in the default gnatmake |
398 |
command.") |
command.") |
399 |
|
(ada-prj-field 'gnatfind_opt "Switches for gnatfind" |
400 |
|
"The command gnatfind is run every time the Ada/Goto/List_References menu. |
401 |
|
You should for instance add -a if you are working in an environment |
402 |
|
where most ALI files are write-protected, since otherwise they get |
403 |
|
ignored by gnatfind and you don't see the references within.") |
404 |
) |
) |
405 |
|
|
406 |
;; |
;; |
407 |
;; Fourth page |
;; Fourth page |
408 |
;; |
;; |
409 |
((= tab-num 4) |
((= tab-num 4) |
410 |
(widget-insert "_/_____________\\/______________\\/______________\\/ \\_____\n\n") |
(widget-insert "/_____________\\/______________\\/______________\\/ \\/______________\\\n") |
|
(widget-insert "All the fields below can use variable substitution\n") |
|
|
(widget-insert "The syntax is ${name}, where name is the name that\n") |
|
|
(widget-insert "appears after the Help buttons in this buffer.\n") |
|
|
(widget-insert "As a special case, ${current} is replaced with the name\n") |
|
|
(widget-insert "of the file currently edited, with directory name but\n") |
|
|
(widget-insert "no extension.\n\n") |
|
|
(widget-insert |
|
|
"The environment variables ADA_INCLUDE_PATH and ADA_OBJECTS_PATH\n") |
|
411 |
(widget-insert |
(widget-insert |
412 |
"are set to ${src_dir} and ${obj_dir} before running the compilation\n") |
"All the fields below can use variable substitution The syntax is ${name}, |
413 |
|
where name is the name that appears after the Help buttons in this buffer. As |
414 |
|
a special case, ${current} is replaced with the name of the file currently |
415 |
|
edited, with directory name but no extension, whereas ${full_current} is |
416 |
|
replaced with the name of the current file with directory name and |
417 |
|
extension.\n") |
418 |
(widget-insert |
(widget-insert |
419 |
"commands, so that you don't need to specify the -aI and -aO\n") |
"The environment variables ADA_INCLUDE_PATH and ADA_OBJECTS_PATH are set to |
420 |
|
${src_dir} and ${obj_dir} before running the compilation commands, so that you |
421 |
|
don't need to specify the -aI and -aO switches on the command line\n") |
422 |
(widget-insert |
(widget-insert |
423 |
"switches on the command line\n\n") |
"You can reference any environment variable using the same ${...} syntax as |
424 |
|
above, and put the name of the variable between the quotes.\n\n") |
425 |
(ada-prj-field 'check_cmd |
(ada-prj-field 'check_cmd |
426 |
"Check syntax of a single file (menu Ada->Check File)" |
"Check syntax of a single file (menu Ada->Check File)" |
427 |
"This command is run to check the syntax and semantics of a file. |
"This command is run to check the syntax and semantics of a file. |
428 |
The file name is added at the end of this command.") |
The file name is added at the end of this command." t) |
429 |
(ada-prj-field 'comp_cmd |
(ada-prj-field 'comp_cmd |
430 |
"Compiling a single file (menu Ada->Compile File)" |
"Compiling a single file (menu Ada->Compile File)" |
431 |
"This command is run when the recompilation |
"This command is run when the recompilation |
432 |
of a single file is needed. The file name is |
of a single file is needed. The file name is |
433 |
added at the end of this command.") |
added at the end of this command." t) |
434 |
(ada-prj-field 'make_cmd "Rebuilding the whole project (menu Ada->Build)" |
(ada-prj-field 'make_cmd "Rebuilding the whole project (menu Ada->Build)" |
435 |
"This command is run when you want to rebuild |
"This command is run when you want to rebuild |
436 |
your whole application. It is never issues |
your whole application. It is never issues |
437 |
automatically and you will need to ask for it. |
automatically and you will need to ask for it. |
438 |
If remote_machine has been set, this command |
If remote_machine has been set, this command |
439 |
will be executed on the remote machine.") |
will be executed on the remote machine." t) |
440 |
(ada-prj-field 'run_cmd "Running the application (menu Ada->Run)" |
(ada-prj-field 'run_cmd "Running the application (menu Ada->Run)" |
441 |
"This command specifies how to run the |
"This command specifies how to run the |
442 |
application, including any switch you need to |
application, including any switch you need to |
443 |
specify. If remote_machine has been set, this |
specify. If remote_machine has been set, this |
444 |
command will be executed on the remote host.") |
command will be executed on the remote host." t) |
445 |
|
) |
446 |
|
|
447 |
|
;; |
448 |
|
;; Fifth page |
449 |
|
;; |
450 |
|
((= tab-num 5) |
451 |
|
(widget-insert "/_____________\\/______________\\/______________\\/______________\\/ \\\n") |
452 |
|
(ada-prj-field 'debug_pre_cmd "Commands to execute before launching the |
453 |
|
debugger" |
454 |
|
"The following commands are executed one after the other before starting |
455 |
|
the debugger. These can be used to set up your environment." t) |
456 |
|
|
457 |
(ada-prj-field 'debug_cmd "Debugging the application" |
(ada-prj-field 'debug_cmd "Debugging the application" |
458 |
"Specifies how to debug the application, possibly |
"Specifies how to debug the application, possibly |
459 |
remotely if remote_machine has been set. We |
remotely if remote_machine has been set. We |
460 |
recommend the following debuggers: |
recommend the following debuggers: |
461 |
> gdb |
> gdb |
462 |
> gdbtk |
> gvd --tty |
463 |
> ddd --tty -fullname -toolbar") |
> ddd --tty -fullname -toolbar") |
464 |
|
|
465 |
|
(ada-prj-field 'debug_post_cmd "Commands to execute in the debugger" |
466 |
|
"The following commands are executed one in the debugger once it has been |
467 |
|
started. These can be used to initialize the debugger, for instance to |
468 |
|
connect to the target when working with cross-environments" t) |
469 |
) |
) |
470 |
|
|
471 |
) |
) |
472 |
|
|
473 |
|
|
516 |
(make-local-variable 'widget-keymap) |
(make-local-variable 'widget-keymap) |
517 |
(define-key widget-keymap "\C-x\C-s" 'ada-prj-save) |
(define-key widget-keymap "\C-x\C-s" 'ada-prj-save) |
518 |
|
|
519 |
|
(set (make-local-variable 'ada-old-cross-prefix) |
520 |
|
(ada-xref-get-project-field 'cross-prefix)) |
521 |
|
|
522 |
(ada-prj-display-page 1) |
(ada-prj-display-page 1) |
523 |
)) |
)) |
524 |
|
|
525 |
;; ---------------- Utilities -------------------------------- |
;; ---------------- Utilities -------------------------------- |
526 |
|
|
527 |
(defun ada-prj-set-list (string ada-dir-list) |
(defun ada-prj-set-list (string ada-list &optional is-directory) |
528 |
"Join the strings in ADA-DIR-LIST into a single string. Each name is put |
"Join the strings in ADA-LIST into a single string. |
529 |
on a separate line that begins with STRING." |
Each name is put on a separate line that begins with STRING. |
530 |
(mapconcat (lambda (x) (concat string "=" (file-name-as-directory x))) |
If IS-DIRECTORY is non-nil, each name is explicitly converted to a |
531 |
ada-dir-list "\n")) |
directory name." |
532 |
|
|
533 |
|
(mapconcat (lambda (x) (concat string "=" |
534 |
|
(if is-directory |
535 |
|
(file-name-as-directory x) |
536 |
|
x))) |
537 |
|
ada-list "\n")) |
538 |
|
|
539 |
|
|
540 |
(defun ada-prj-get-prj-dir (&optional ada-file) |
(defun ada-prj-get-prj-dir (&optional ada-file) |
562 |
back keeps the new value." |
back keeps the new value." |
563 |
(set 'ada-prj-current-values |
(set 'ada-prj-current-values |
564 |
(plist-put ada-prj-current-values |
(plist-put ada-prj-current-values |
565 |
(widget-get widget 'prj-field) |
(widget-get widget ':prj-field) |
566 |
(widget-value widget)))) |
(widget-value widget)))) |
567 |
|
|
568 |
(defun ada-prj-display-help (widget widget-modified event) |
(defun ada-prj-display-help (widget widget-modified event) |
583 |
))) |
))) |
584 |
|
|
585 |
(defun ada-prj-show-value (widget widget-modified event) |
(defun ada-prj-show-value (widget widget-modified event) |
586 |
(let ((value (plist-get ada-prj-current-values |
(let* ((field (widget-get widget ':prj-field)) |
587 |
(widget-get widget 'prj-field))) |
(value (plist-get ada-prj-current-values field)) |
588 |
(inhibit-read-only t)) |
(inhibit-read-only t) |
589 |
|
w) |
590 |
|
|
591 |
;; If the other widget is already visible, delete it |
;; If the other widget is already visible, delete it |
592 |
(if (widget-get widget 'prj-other-widget) |
(if (widget-get widget 'prj-other-widget) |
593 |
(progn |
(progn |
594 |
(widget-delete (widget-get widget 'prj-other-widget)) |
(widget-delete (widget-get widget 'prj-other-widget)) |
595 |
(widget-put widget 'prj-other-widget nil) |
(widget-put widget 'prj-other-widget nil) |
596 |
|
(widget-put widget ':prj-field field) |
597 |
(widget-default-value-set widget "Show Value") |
(widget-default-value-set widget "Show Value") |
598 |
) |
) |
599 |
|
|
602 |
(mouse-set-point event) |
(mouse-set-point event) |
603 |
(forward-line 1) |
(forward-line 1) |
604 |
(beginning-of-line) |
(beginning-of-line) |
605 |
(widget-put widget 'prj-other-widget |
(setq w (widget-create 'editable-list |
606 |
(widget-create 'editable-list |
:entry-format "%i%d %v" |
607 |
:entry-format "%i%d %v" |
:notify 'ada-prj-field-modified |
608 |
:notify 'ada-prj-field-modified |
:help-echo (widget-get widget 'prj-help) |
609 |
:help-echo (widget-get widget 'prj-help) |
:value value |
610 |
:value value |
(list 'editable-field :keymap widget-keymap))) |
611 |
(list 'editable-field |
(widget-put widget 'prj-other-widget w) |
612 |
:keymap widget-keymap))) |
(widget-put w ':prj-field field) |
613 |
|
(widget-put widget ':prj-field field) |
614 |
(widget-default-value-set widget "Hide Value") |
(widget-default-value-set widget "Hide Value") |
615 |
) |
) |
616 |
) |
) |
656 |
(list 'quote field))) |
(list 'quote field))) |
657 |
"Load Recursive Directory") |
"Load Recursive Directory") |
658 |
(widget-insert "\n ${build_dir}\n"))) |
(widget-insert "\n ${build_dir}\n"))) |
659 |
|
|
660 |
(set 'widget |
(set 'widget |
661 |
(if is-list |
(if is-list |
662 |
(if (< (length value) 15) |
(if (< (length value) 15) |
666 |
:help-echo help-text |
:help-echo help-text |
667 |
:value value |
:value value |
668 |
(list 'editable-field :keymap widget-keymap)) |
(list 'editable-field :keymap widget-keymap)) |
669 |
|
|
670 |
(let ((w (widget-create 'push-button |
(let ((w (widget-create 'push-button |
671 |
:notify 'ada-prj-show-value |
:notify 'ada-prj-show-value |
672 |
"Show value"))) |
"Show value"))) |
673 |
(widget-insert "\n") |
(widget-insert "\n") |
|
(widget-put w 'prj-field field) |
|
674 |
(widget-put w 'prj-help help-text) |
(widget-put w 'prj-help help-text) |
675 |
(widget-put w 'prj-other-widget nil) |
(widget-put w 'prj-other-widget nil) |
676 |
w) |
w) |
681 |
:help-echo help-text |
:help-echo help-text |
682 |
:keymap widget-keymap |
:keymap widget-keymap |
683 |
value))) |
value))) |
684 |
(widget-put widget 'prj-field field) |
(widget-put widget ':prj-field field) |
685 |
(if after-text |
(if after-text |
686 |
(widget-insert after-text)) |
(widget-insert after-text)) |
687 |
(widget-insert "\n") |
(widget-insert "\n") |
691 |
;; Set the keymap once and for all, so that the keys set by the user in his |
;; Set the keymap once and for all, so that the keys set by the user in his |
692 |
;; config file are not overwritten every time we open a new file. |
;; config file are not overwritten every time we open a new file. |
693 |
(ada-prj-add-keymap) |
(ada-prj-add-keymap) |
|
(ada-prj-add-ada-menu) |
|
694 |
|
|
695 |
(provide 'ada-prj) |
(provide 'ada-prj) |
696 |
|
|