Georg Bauhaus <[email protected]> writes: > Am 23.09.2013 um 18:22 schrieb Stephen Leake: > >> Simon Wright <[email protected]> writes: >> >>> Great, some little problems: here, and I've attached the input. >> >> All fixed in current head on ada-france. >> >>> This is the input (as I would like it; ada-mode 4 indents the "is" wrt >>> the "type". I can live with the indent if it's tricky!): >> >> I did not look at aligning 'is' with 'type'. It should not be hard, but >> I'd rather focus on fixing bugs than adding more 'nice-to-haves' at this >> point. > > An fairly easy to add `nice-to-have' for working with Ada Mode might be, > I think, to have an Emacs buffer display the parser's syntax errors.
There is only one; it stops at the first error. So just go to the *Messages* buffer. > The ones that appear after "Toggle show parser errors", that is. "Toggle show parser errors" sets wisi-debug to 1 or 0. (higher values are used for debugging the parser and/or grammar). The error messages are not generated at all if wisi-debug is 0. They could be generated and written to a background buffer for wisi-debug 0; then you could switch to the buffer if you suspect a failed parse. A problem here; when to erase the background buffer. Clearing it on every successful parse is possibly not what you want; there will only be one background buffer for all source files, and there might be active parses in several source files. On the other hand, having old messages lying around would be confusing. Note that the messages are nowhere near as helpful/informative as GNAT messages; they use the grammar terms. Still, they are helpful. > Maybe that's planned already? They messages have line and column > number. If this buffer displays errors in the style of *occur*, > *grep*, etc. then while editing, the messages are just as useful as > those of the Ada translators! The format was just habit (what other format could I possibly use? :), but it could be tied to 'next-error'. > I really like it when they direct me to places that actually are > syntactically wrong. (Prefix "\C-c g" is unused in the keymap, it > could play the role of the usual "ESC g".) Hmm; that's interesting; a key that would either go to the location for the last parse error for the current buffer, and put the error message in the minibuffer, or report "successful parse". That doesn't require a background buffer, just a buffer-local variable. I like that! That could replace "toggle show parser error" in the menu. > For the bug list: > Not all Ada source text is parsed, it seems, as the mode currently > stops after just one compilation unit per buffer, expecting $EOI > or PRAGMA. Yes. That follows the GNAT file format of one compilation unit per buffer. I gather you have code that has more than one? That should be easy to fix in the grammar; I didn't do it initially to keep things simple. -- -- Stephe _______________________________________________ Emacs-ada-mode mailing list [email protected] http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org
