Open paralogismos opened 5 months ago
Yes, the old ada-mode
did not support Ada 2012, that should be stated in the README.
We have three possible Ada modes for Emacs, and none of them entirely satisfactory, in my opinion. I've checked that ada-light-mode
indents your snippets (although rigidly and after finishing the current statement) once you've activated eglot
and the ada_language_server
.
I wonder if this one would work with eglot and company-mode but working with its own indentation engine. It would be mildly satisfactory if you don't mind the lack of Ada 2012 support.
It seems that old-ada-mode is broken when handling
case
expressions andif
expressions. Consider the two code examples below:These are legal Ada programs which compile and run, but old-ada-mode complains about "No matching proc/func/task/declare/package/protected." When the conditional expression occurs in a loop old-ada-mode complains of the
end loop
that "Matching start is not 'loop'."Note that old-ada-mode can be satisfied by the inclusion of a "matching"
end case
orend if
, but then the code is no longer legal Ada code and will not compile.This issue does not prevent one from writing correct code, but it does cause much unpleasantness and havoc with formatting and ada-mode warnings below any occurrences of conditional expressions in source code.
Conditional expressions were an addition to Ada 2012, so I suspect that old-ada-mode just predates these newer language features; still, this is an annoying gap.