[Emacs-ada-mode] Adapting comp_cmd or make_cmd in my .emacs, NOT in some .adp (project) file
Philippe Bertin
philippe.bertin at telenet.be
Thu Oct 12 08:54:25 PDT 2006
Hello all,
When I google for a solution for my problem, I always encounter the
solution path related to using (emacs .adp) project files. However, I
would like to avoid using .adp project files alltogether.
I'd like to perform my compilations/makes based on the settings in my
~/.emacs, and all of them should be made regardless of any .adp
settings. Because maintaining both a .gpr file and a .adp file will turn
into maintenance problems one day or another. I'd be using gnatmake and
it's -P switch and a .gpr project file to compile/make in emacs, just as
I do them on the command line.
I tried changing the ada mode by hooking onto ada-mode so that it would
look like (in this specific case, overriding the C-c C-c binding too) :
(add-hook 'ada-mode-hook
(lambda()
(define-key ada-mode-map "\C-c\C-c" 'ada-compile-current)
(setq comp_cmd "gnatmake -c -Pmy_own_projects_dot_gpr_file.gpr")
))
That way (as one of the first threads on this mailing list somewhen
suggested) I could use C-u C-c C-c, eventually edit the command line
(with my default compile command in it), and hit enter to compile "just"
that file, *but* using my .gpr file... However, this does not work out
fine : C-c C-c continues to compile as before. What am I doing wrong ?
(In a next phase, I'll of course want to change make_cmd too, in order
to be capable of using .gpr files for makes too)
Thanks,
Philippe Bertin.
More information about the Emacs-ada-mode
mailing list