Georg Bauhaus <[email protected]> writes:
> Am 28.09.2013 um 17:21 schrieb Stephen Leake:
>
>> I've pushed a revision with a first draft of ada-skel.el, implementing
>> the token expansion I discussed.
>
> A few minor things about ada-skel.el; two bugs with possible fixes:
>
> 1. If . is the cursor, and Ada text is
>
> KEYWORD NAME .
>
> then ada-skel-expand needs to (skip-syntax-backwards " ") first,
Yes, I just added that, as well as the ability to expand a placeholder
token (see "header").
>then it
> can continue and work properly. If the user has typed SPACE after
> NAME, it will have had the effect of casing NAME which otherwise does
> not happen (yet) during expansion, AFAICS.
Good point. I could add a call to ada-adjust-case in there.
> 2. The table ada-skel-token-alist lists its Ada keywords in lower case,
> and (assoc-string ... ada-skel-token-alist ...) is currently case-sensitive.
> Therefore, "IF" etc. in upper case are not associated.
Another good point. I think that needs a call to `downcase'.
> As a proof of concept, I have added control of verbosity of skeletons.
> The suggestion is that if current-prefix-arg has a value, then the skeleton
> that is picked from ada-skel-token-alist can be the second of actually two,
> if there are two. The second would insert more text, e.g. exception
> handlers.
This can now be handled by mapping a token to an alist of skeletons:
(package
(("plain spec". ada-skel-package-spec-plain)
("verbose spec". ada-skel-package-spec-verbose)
("plain body" ...)))
--
-- Stephe
_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org