GNU bug report logs - #36278
26.1; ada-mode 6.0.0 auto-casing no longer honors the casing of the declaration

Previous Next

Packages: emacs, ada-mode;

Reported by: Ludovic Brenta <ludovic <at> ludovic-brenta.org>

Date: Tue, 18 Jun 2019 12:00:02 UTC

Severity: minor

Found in version 26.1

Done: Stephen Leake <stephen_leake <at> stephe-leake.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36278 in the body.
You can then email your comments to 36278 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to ada-mode-users <at> nongnu.org, bug-gnu-emacs <at> gnu.org:
bug#36278; Package emacs, ada-mode. (Tue, 18 Jun 2019 12:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Brenta <ludovic <at> ludovic-brenta.org>:
New bug report received and forwarded. Copy sent to ada-mode-users <at> nongnu.org, bug-gnu-emacs <at> gnu.org. (Tue, 18 Jun 2019 12:00:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Brenta <ludovic <at> ludovic-brenta.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; ada-mode 6.0.0 auto-casing no longer honors the casing of the
 declaration
Date: Tue, 18 Jun 2019 13:59:11 +0200
Package: emacs, ada-mode
X-Debbugs-CC: ada-mode-users <at> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36278; Package emacs, ada-mode. (Sat, 22 Jun 2019 19:43:02 GMT) Full text and rfc822 format available.

Message #8 received at 36278 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Leake <stephen_leake <at> stephe-leake.org>
To: 36278 <at> debbugs.gnu.org
Subject: update
Date: Sat, 22 Jun 2019 12:22:49 -0700
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36278; Package emacs, ada-mode. (Sun, 23 Jun 2019 17:42:01 GMT) Full text and rfc822 format available.

Message #11 received at 36278 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Leake <stephen_leake <at> stephe-leake.org>
To: 36278 <at> debbugs.gnu.org
Subject: update
Date: Sun, 23 Jun 2019 10:19:52 -0700
Another solution is to add a user option to not auto-correct all uppercase.
-- 
-- Stephe




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36278; Package emacs, ada-mode. (Sat, 13 Jul 2019 21:31:02 GMT) Full text and rfc822 format available.

Message #14 received at 36278 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Leake <stephen_leake <at> stephe-leake.org>
To: 36278 <at> debbugs.gnu.org
Subject: update
Date: Sat, 13 Jul 2019 14:29:49 -0700
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36278; Package emacs, ada-mode. (Sun, 18 Aug 2019 16:59:02 GMT) Full text and rfc822 format available.

Message #17 received at 36278 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Leake <stephen_leake <at> stephe-leake.org>
To: 36278 <at> debbugs.gnu.org
Subject: Fixed in ada-mode 6.1.1
Date: Sun, 18 Aug 2019 09:58:21 -0700
Fixed in ada-mode 6.1.1; set ada-auto-case to 'not-upper-case.
-- 
-- Stephe




Reply sent to Stephen Leake <stephen_leake <at> stephe-leake.org>:
You have taken responsibility. (Sun, 18 Aug 2019 16:59:02 GMT) Full text and rfc822 format available.

Notification sent to Ludovic Brenta <ludovic <at> ludovic-brenta.org>:
bug acknowledged by developer. (Sun, 18 Aug 2019 16:59:02 GMT) Full text and rfc822 format available.

Message #22 received at 36278-close <at> debbugs.gnu.org (full text, mbox):

From: Stephen Leake <stephen_leake <at> stephe-leake.org>
To: 36278-close <at> debbugs.gnu.org
Subject: close
Date: Sun, 18 Aug 2019 09:58:37 -0700
-- 
-- Stephe




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 16 Sep 2019 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 195 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.