[Emacs-ada-mode] updated ada-mode with manual
Stephen Leake
stephen_leake at stephe-leake.org
Thu Aug 31 01:16:44 PDT 2006
Jean-Pierre Rosen <rosen at adalog.fr> writes:
> Stephen Leake a écrit :
>> Yes, I did say that. But I always reserve the right to change my mind
>> :). In this case, I thought one reasonable fix was user education via
>> a better ada-mode manual.
>>
> For someone who uses Ada every day, sure. But think of trainees; in a 6
> day course, don't expect them to read the Emacs manual...
Right.
>> Well, if you are used to building projects that have more than one
>> file, it's _very_ intuitive! It would be completely wrong to invoke
>> gnatmake on the file I happen to have edited last, rather than on the
>> main file.
>
> Remember, we are discussing this in the context where there is no main
> defined. If you are on a multi-file project, you'd better define your
> main, and then everybody agrees that this is the main that should be
> "gnatmade".
Right.
>> Ok. That will be the "set main and build" command I proposed
>> recently.
>
> No, please, just *don't* set main automatically. That's what causes the
> trouble.
The main is set automatically by the current functions; "compile file"
always sets it, "check file" and "build" set it if it has not been set
yet.
So for the second invocation of any of the compile commands, main is set.
>> But there also needs to be one key/menu item to build the current
>> main. I don't really care which key is which, but currently C-c C-c is
>> "build current main".
>>
>> So "set main and build" will be some other key. I guess I need to make
>> a list of all the ada-mode keys currently defined, so we can pick a
>> new one.
>>
> I don't think you need that. C-c C-c builds the main if it is defined,
> the current buffer otherwise. Main is never set automatically. What's
> the problem with that approach?
Not setting main is really not an option with the current design of the
code; it would be a major re-write.
These are the key bindings with C-c prefix:
C-c C-a ada-move-to-start
C-c C-b ada-adjust-case-buffer
C-c C-c ada-compile-application
C-c C-d ada-goto-declaration
C-c C-e ada-move-to-end
C-c C-f ada-format-paramlist
C-c C-l ada-indent-region
C-c C-n ada-make-subprogram-body
C-c C-o ada-goto-parent
C-c C-r ada-find-references
C-c C-s ada-xref-goto-previous-reference
C-c C-t ada-case-read-exceptions
C-c C-v ada-check-current
C-c C-y ada-create-case-exception
C-c ESC Prefix Command
C-c TAB ada-justified-indent-current
C-c c ada-change-prj
C-c d ada-set-default-project-file
C-c f ada-find-file
C-c g ada-gdb-application
C-c l ada-find-local-references
C-c o ff-find-other-file
C-c r ada-run-application
C-c t Prefix Command
C-c u ada-prj-edit
So, if we bind C-c C-m to "set main and build", would that work for
you, in the trainees situation?
--
-- Stephe
More information about the Emacs-ada-mode
mailing list