Stephen Leake <[email protected]> writes:
> Georg Bauhaus <[email protected]> writes:
>
>> ;; 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.
We could define an alist indexed by the first keyword in each Ada
statement (or some other relevant word):
(defconst ada-skel-token-alist
'(("array" . ada-array)
("case" . ada-case)
("procedure" . ada-procedure))
"")
Then ada-skel-expand looks up the previous word in the alist, and
invokes the skeleton.
If the previous word is not in the alist, assume it's a name (ie for
"procedure Foo"), lookup the word before that, and invoke the skeleton
with the name.
I don't see you in AUTHORS, so I'm assuming you have not filed a
copyright assignment for Emacs code. So I can't just take your version
of ada-stmt.el. Are you willing to sign a copyright assignment?
I'll take the Ada mode 4.01 version, rename it to ada-skel.el, and add
the above alist.
--
-- Stephe
_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org