unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#36278: 26.1; ada-mode 6.0.0 auto-casing no longer honors the casing of the declaration
@ 2019-06-18 11:59 Ludovic Brenta
  2019-06-22 19:22 ` bug#36278: update Stephen Leake
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Ludovic Brenta @ 2019-06-18 11:59 UTC (permalink / raw)
  To: 36278; +Cc: ada-mode-users

Package: emacs, ada-mode
X-Debbugs-CC: ada-mode-users@nongnu.org
Severity: minor

Hello,

In ada-mode 5.2, auto-casing honors the casing of the declaration of an
entity but ada-mode 6.2 does not; instead it forces the user to create
a casing exception on every declaration that uses "non-standard" casing.
In our large code base this causes frustration as programmers often
introduce local upper-case acronyms to shorten some names, e.g.

procedure A (The_Flight : in Flight.T) is
    FTFX : Flight.Fixed_Info.T renames The_Flight.Fixed_Info;
begin
    FTFX.Foo := True;
end A;

Supposing a procedure A that is hundreds of lines long with dozens of
uses of FTFX, ada-mode 6.0 is unhelpful when forcing the casing down
to Ftfx.  Adding casing exceptions for such local uses is not really
appealing.

Would it be difficult to use casing-as-declaration by default with the
new parser in 6.x?

-- 
Ludovic Brenta.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#36278: update
  2019-06-18 11:59 bug#36278: 26.1; ada-mode 6.0.0 auto-casing no longer honors the casing of the declaration Ludovic Brenta
@ 2019-06-22 19:22 ` Stephen Leake
  2019-06-23 17:19 ` Stephen Leake
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Stephen Leake @ 2019-06-22 19:22 UTC (permalink / raw)
  To: 36278

Can you post a working example showing ada-mode 5.2 respecting the
casing of the declaration? As far as I know, that has never been
supported by ada-mode.

The GNAT compiler casing check does enforce that.

The ada-mode parser does not do name resolution, so it cannot
associate a variable use with a variable declaration, so it is not
possible to implement this.

We could automate declaring the exceptions; the parser can find all
variable declarations in a file, and check to see if they need a casing
exception.

If there are a lot of exceptions that are single-file only, we could
support per-file exceptions, by declaring them in the Emacs Local
Variables.

-- 
-- Stephe





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#36278: update
  2019-06-18 11:59 bug#36278: 26.1; ada-mode 6.0.0 auto-casing no longer honors the casing of the declaration Ludovic Brenta
  2019-06-22 19:22 ` bug#36278: update Stephen Leake
@ 2019-06-23 17:19 ` Stephen Leake
  2019-07-13 21:29 ` Stephen Leake
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Stephen Leake @ 2019-06-23 17:19 UTC (permalink / raw)
  To: 36278

Another solution is to add a user option to not auto-correct all uppercase.
-- 
-- Stephe





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#36278: update
  2019-06-18 11:59 bug#36278: 26.1; ada-mode 6.0.0 auto-casing no longer honors the casing of the declaration Ludovic Brenta
  2019-06-22 19:22 ` bug#36278: update Stephen Leake
  2019-06-23 17:19 ` Stephen Leake
@ 2019-07-13 21:29 ` Stephen Leake
  2019-08-18 16:58 ` bug#36278: Fixed in ada-mode 6.1.1 Stephen Leake
  2019-08-18 16:58 ` bug#36278: close Stephen Leake
  4 siblings, 0 replies; 6+ messages in thread
From: Stephen Leake @ 2019-07-13 21:29 UTC (permalink / raw)
  To: 36278

In ada-mode version 6.1.1 (released 11 Jul 2019), ada-auto-case can now
take the value `not-upper-case'; typed words that are all upper case are
not adjusted.
-- 
-- Stephe





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#36278: Fixed in ada-mode 6.1.1
  2019-06-18 11:59 bug#36278: 26.1; ada-mode 6.0.0 auto-casing no longer honors the casing of the declaration Ludovic Brenta
                   ` (2 preceding siblings ...)
  2019-07-13 21:29 ` Stephen Leake
@ 2019-08-18 16:58 ` Stephen Leake
  2019-08-18 16:58 ` bug#36278: close Stephen Leake
  4 siblings, 0 replies; 6+ messages in thread
From: Stephen Leake @ 2019-08-18 16:58 UTC (permalink / raw)
  To: 36278

Fixed in ada-mode 6.1.1; set ada-auto-case to 'not-upper-case.
-- 
-- Stephe





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#36278: close
  2019-06-18 11:59 bug#36278: 26.1; ada-mode 6.0.0 auto-casing no longer honors the casing of the declaration Ludovic Brenta
                   ` (3 preceding siblings ...)
  2019-08-18 16:58 ` bug#36278: Fixed in ada-mode 6.1.1 Stephen Leake
@ 2019-08-18 16:58 ` Stephen Leake
  4 siblings, 0 replies; 6+ messages in thread
From: Stephen Leake @ 2019-08-18 16:58 UTC (permalink / raw)
  To: 36278-close


-- 
-- Stephe





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-08-18 16:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-18 11:59 bug#36278: 26.1; ada-mode 6.0.0 auto-casing no longer honors the casing of the declaration Ludovic Brenta
2019-06-22 19:22 ` bug#36278: update Stephen Leake
2019-06-23 17:19 ` Stephen Leake
2019-07-13 21:29 ` Stephen Leake
2019-08-18 16:58 ` bug#36278: Fixed in ada-mode 6.1.1 Stephen Leake
2019-08-18 16:58 ` bug#36278: close Stephen Leake

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).