Georg Bauhaus <[email protected]> writes:

> Just some quick responses, more after the week-end I hope.
>
> On 27.09.13 14:14, Stephen Leake wrote:
>> Can you use indent-region after a complete statement? We could add
>> ada-indent-statement (I thought I had already). Maybe call that from
>> seleton-end-hook? 
>
> That was exactly the plan: get the region of the (syntactically
> correct) text that skeleton has inserted and then indent it
> (as if someone had marked it and pressed TAB).

Right. There is code that does this in ada-wisi-post-parse-fail. That
could be abstracted to ada-indent-statement.

>> I'm missing something fundamental about skeleton. I don't see any
>> "define-key" statements related to skeleton, so I don't know how to
>> experiment. How/when is a skeleton invoked? Can you give a small
>> tutorial, showing all keystrokes required to create a Hello_World
>> procedure?
>
> The (now obsolescent) standard ada-mode.el 

I just call that ada-mode 4.01; my latest is 5.00.

> has a keymap
> and uses define-key to bind keys and skeleton names,
>
> ...
>   ;;  The templates, defined in ada-stmt.el
>
>   (let ((map (make-sparse-keymap)))
>     (define-key map "h"    'ada-header)
>     (define-key map "\C-a" 'ada-array)
>     (define-key map "b"    'ada-exception-block)
>     (define-key map "d"    'ada-declare-block)
> ...
>

Ok. Those are invoked by C-c C-q t ... . I don't understand why some are
C- and others are not.

I suggest we define this map as ada-stmt-map in ada-stmt.el, and bind it
to C-c C-e (for expand) in ada-mode-map, thru an indirection variable to
allow experimenting with other template systems.

(I will override that in my local setup to just C-e :)

> For my slightly changed setup, I used M-: for evaluating, say,
> (ada-stmt-place-skeleton 'ada-declare-block nil '("Block_Name"))

So that's what should be bound to 'C-c C-e b' now? 

I guess I'll have to play with it.

-- 
-- Stephe

_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org

Reply via email to