Am 22.02.2014 13:58, schrieb Stephen Leake:
Georg Bauhaus <[email protected]> writes:
On 22 Feb 2014, at 10:59, Simon Wright <[email protected]> wrote:
On 22 Feb 2014, at 07:57, Stephen Leake <[email protected]> wrote:
Markus Schöpflin <[email protected]> writes:
Hello,
how do I configure the new Ada mode to use all upper case for
identifiers? I can't find any option for this.
(setq ada-case-keyword 'upcase-word)
That seems to work fine if you want to upcase *keywords*; Markus
wants to upcase *identifiers*. (I made the same mistake!)
Dang, and now I realize I did the same mistake when Stephe asked about this
back in 2012:
:Am 23.11.2012 08:42, schrieb Stephen Leake:
:I'm starting to work on casing.
:Currently there are four user options that control casing, with the
:following defaults:
:ada-auto-case t
:ada-case-attribute 'ada-capitalize-word
:ada-case-keyword 'downcase-word
:ada-case-identifier 'ada-loose-case-word
:Does anyone change the defaults?
:If you are using "Ada 83 style", you might have set ada-case-keyword to
:'upcase-word'.
Any my reply was:
:That's what we (still) do.
The 'that' referring to ada-case-keyword, and I of course meant we set
ada-case-identifier to upcase-word. :-/
[...]
I'll put it on the list; it may be in 5.0.2. It will still be named
ada-case-identifier, so the patch will be:
+ (defvar ada-case-identifier 'downcase-region "")
- (downcase-region start end))
+ (funcall ada-case-identifier start end))
Thanks for this.
if you want to do this yourself in a forward-compatible way. Then add
(setq ada-case-identifier 'upcase-region) in your .emacs or project file
(an Emacs Ada mode project file can reference an elisp file for this
sort of thing).
Hmm. That is part of 'ada-case-adjust-identifier', whose doc string says
"used Mixed_Case with exceptions". So at least the docstring has to also
change. It could also skip the mixed-case part of the code.
And there may be other things I have not thought of yet.
So the full change will be more complicated. The right way may involve
factoring out 'ada-mixed-case' and specifying that for the default of
'ada-case-identifier' (which is what 4.0 did). Which is why it may not
be in 5.0.2.
Somebody is going to want CamelCase; I might as well anticipate that :)
(it would have to use a dictionary!).
I'm pretty sure that it won't be me me. :-)
Thanks again for your wonderful work on the new Ada mode.
Regards,
Markus
_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org