ada-mode-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ada-mode-users] [patch] C-u ada-show-references, obj_dir


From: Stephen Leake
Subject: Re: [Ada-mode-users] [patch] C-u ada-show-references, obj_dir
Date: Fri, 04 Nov 2016 13:15:21 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt)

Ludovic Brenta <address@hidden> writes:

> I have rebased and rewritten my earlier patch to support an "append"
> mode for ada-show-references without using flet.

Ok. I'm not integrating this for now, because it's not a general
solution.

Another choice here is to switch to the 'xref' facility in Emacs 25, if
you are using Emacs 25. That is the prefered way to do cross references,
and I have an Ada backend for it (not in GNU ELPA ada-mode).

That currently does not support appending to a current buffer, but it
would be easier to incorporate that feature into xref than into compile.

> This patch also restores support for the "obj_dir" component of
> old-style Ada mode project files, which we still use (we have someone
> working on migrating our build processes to GPR project files but this
> work is not complete yet).

That makes sense; we still support 'src_dir' for sources outside gpr, so
we might as well support 'obj_dir'. 

However, gnat-run-gnat adds the -P project switch, so
ada-gnat-xref-parents should not; is that left over from a previous
iteration, or have I got something wrong?

Similarly, in ada-gnat-xref-all, the current code checks for a gpr file,
while your code uses ada-prj-current-file, which may not be a gpr file.
And you don't pass it thru file-name-nondirectory. I used the current code.

In ada-mode.el ada-prj-get, the default for obj_dir is (list "."), while
the default for src_dir is (list (directory-file-name
default-directory)). I believe I had problems with "." being interpreted
relative to the wrong directory, so I'll use the same default as
src_dir.

I added an entry for 'obj_dir' in the list of project file vars in
ada-mode.texi.

Committed in 1fadae6ce2b8714a85cae1aa49b93937ca5252d5. This passes all
my tests. I did not add any tests for obj_dir, so let me know if there's
a problem.

--
-- Stephe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]