[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ada-mode-users] [patch] ada-goto-declaration when point is on an op
From: |
Stephen Leake |
Subject: |
Re: [Ada-mode-users] [patch] ada-goto-declaration when point is on an operator |
Date: |
Tue, 08 Nov 2016 11:33:55 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) |
Thanks for the bug report; I'm working on it.
With GNAT GPL 2016, I get:
gnat find -Pada_mode_parent.gpr -a "+":ada_mode-slices.adb:39:21
gnat: 'gnat find -P' is no longer supported
So you'll have to switch to gpr-query at some point.
What version of GNAT are you using, and what GPL version should I test
with?
You could actually send me a copy of the GNAT you are using, but let's
not do that unless absolutely necessary.
We need to handle the 1+ kludge in the backend, or introduce the same
problem in gpr_query.exe.
Ludovic Brenta <address@hidden> writes:
> Consider the following line:
>
> Set_Model (Tree.View, +Tree.Store); -- line 3775
>
> ada-goto-declaration has two bugs which this patch corrects.
>
> First, if point is inside the second occurrence of "Tree",
> ada-identifier-at-point skips backward until point is on the + and
> then it returns the string "+". With my patch,
> ada-identifier-at-point correctly moves point to the T and returns
> "Tree" instead.
>
> Second, if ada-gnat-xref-other receives an identifier which is an
> operator (e.g. it receives the string "+"), it calls gnat find like
> so:
>
> gnat find +:lgtk-tree_store.adb:3775:27
>
> and gnat find returns nothing. gnat find insists that the + be
> surrounded in double-quotes, like this:
>
> gnat find "+":lgtk-tree_store.adb:3775:27
>
> (If you want to try this in a shell, it won't work: you need to
> surround the entire argument in single quotes:
>
> gnat find '+:lgtk-tree_store.adb:3775:27'
> gnat find '"+":lgtk-tree_store.adb:3775:27'
> )
>
> In my patch, when point is on the +, ada-identifier-at-point returns
> the string "\"+\"", which is what gnat find wants. However, gnat find
> also wants the column number to be one less than the actual column
> where the "+" lies, or it returns nothing. I only have an ugly
> solution for this; if someone has a better idea, that would be
> welcome.
--
-- Stephe