comp.lang.ada
 help / color / mirror / Atom feed
From: julian.fondren@gmail.com
Subject: Re: Gnu Emacs Ada mode 6.0.0 released
Date: Wed, 5 Dec 2018 11:00:55 -0800 (PST)
Date: 2018-12-05T11:00:55-08:00	[thread overview]
Message-ID: <37b37926-dc45-415d-8b26-eba34c52e339@googlegroups.com> (raw)
In-Reply-To: <f97d0a5c-8924-400b-82cf-81f69ce85e46@googlegroups.com>

On Wednesday, December 5, 2018 at 12:51:44 PM UTC-6, julian....@gmail.com wrote:
> On Monday, December 3, 2018 at 12:57:50 PM UTC-6, Stephen Leake wrote:
> > Gnu Emacs Ada mode 6.0.0 is now available in GNU ELPA. See the
> > homepage (http://www.nongnu.org/ada-mode/) for news.
> > 
> > This is a major release; an error correcting parser written in Ada is
> > provided, and the grammar actions have been rewritten to implement
> > indentation more efficiently. The Ada parser is useable on very large
> > files. The elisp parser is still available, but does not provide error
> > correction.
> 
> Thanks. This fixes the only annoyance that I had with 5.0.0, that a
> 'procedure' would be indented too far if it followed a function
> with a parenthesized body (that wasn't on the same line as its
> 'function').
> 
> It requires me to update my hack to ada-mode though, previously to the
> ada-adjust-case-interactive function. I changed that function so that
> I could type
> 
>   words-like-this with-dashes as-the-alternative-is-actually-painful
> 
> and get
> 
>   Words_Like_This With_Dashes -- etc.
> 
> My hack wasn't very robust. It just inserted _ instead of - if the
> previous char in the buffer was some kind of [[:alpha:]]

That update wasn't too hard. The function's now ada-case-adjust-interactive ,
and I just added an additional test before the T case

     ((and (eq lastk ?-)
           (save-excursion (ignore-errors (re-search-backward "[[:alpha:]]" (- (point) 1)))))
      (when ada-auto-case
        (ada-case-adjust lastk))
      (insert "_"))

  reply	other threads:[~2018-12-05 19:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-03 18:57 Gnu Emacs Ada mode 6.0.0 released Stephen Leake
2018-12-03 20:07 ` Shark8
2018-12-04  0:25 ` Dan'l Miller
2018-12-04 20:33   ` Stephen Leake
2018-12-05 18:51 ` julian.fondren
2018-12-05 19:00   ` julian.fondren [this message]
2018-12-05 19:37   ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox