[Emacs-ada-mode] Ada 2005 feature: extended return statement
deadlyhead
deadlyhead at deadlyhead.com
Sun Oct 12 01:54:57 PDT 2008
What is the status of Ada 2005 support in ada-mode? Currently I'm
trying to use an extended return statement of the following form (taken
from _Programming in Ada 2005_ by John Barnes):
-- begin example
function Add_To_List (The_List : access Cell,
Obj_Ptr : access Object'Class) return access Cell is
Local : access Cell := new Cell;
begin
return Local : access Cell := new Cell do
Local.Next := The_List;
Local.Element := Obj_Ptr;
end return;
end Add_To_List;
-- end example
Attempting to type in the return statement triggers an error from ada-mode:
Missing 'accept' in front of 'do'
This prevents me from actually entering in a new line after end return;,
which can be gotten around, but is annoying. :-/
I'm currently running the version of ada-mode off of the web site,
version 3.9. I understand that you have version 4.0 available via Emacs
CVS, and that you're planning to update the site with this version,
too. Does 4.0 have support for extended returns?
I've gone digging through the source of ada-mode.el a bit, but haven't
quite wrapped my head around where all of the decisions for word
ordering, indentation, etc, are made, so I'm hesitant to just start
hacking, especially without the latest version of the code. If you have
any suggestions on understanding how this code works, though, I'm
willing to try adding extended returns to it, though.
-- deadlyhead
More information about the Emacs-ada-mode
mailing list