Ludovic Brenta <[email protected]> writes: > I received a complaint about the error handling inside ada-goto- > declaration. Suppose point is on the Q in the line > > type Q is new Pak1.Pak2 (parameters...); > > and the user types C-c C-d (ada-goto-declaration). This runs > gnatfind in a new buffer; gnatfind only the "spec" line for > package Q, since there is no body. This triggers this part > of ada-gnat-xref-other: > > (when (eobp) > (pop-to-buffer (current-buffer)) > (error "gnat find did not return other item")) > > The pop-to-buffer part annoys people who are not interested in > debugging ada-mode; they prefer nothing to change on their > screen rather than seeing the buffer where gnatfind was running > :)
Yes, that makes sense. Maybe we need an "ada-mode-debug" flag for this; 0 for normal use, 1 for some debug, 2 for intense debug, as for wisi-debug. > It could be argued that there is no error to report since not > all entities in Ada have an "other item" to find. It's actually a user error; what were they expecting C-c C-d to do, since there is no full type for Q? But there should be a gentler response to the user error. Just a message: "no corresponding item found". -- -- Stephe _______________________________________________ Emacs-ada-mode mailing list [email protected] http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org
