GNU bug report logs - #63438
30.0.50; abbrev mode wrongly capitalizes with mixed capitalized words

Previous Next

Package: emacs;

Reported by: Daniel Fleischer <danflscr <at> gmail.com>

Date: Thu, 11 May 2023 07:11:01 UTC

Severity: wishlist

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Daniel Fleischer <danflscr <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 63438 <at> debbugs.gnu.org
Subject: bug#63438: 30.0.50; abbrev mode wrongly capitalizes with mixed capitalized words
Date: Thu, 11 May 2023 12:00:39 +0300
Eli Zaretskii [2023-05-11 Thu 11:29] wrote:

> What you see is the documented behavior: by default, if the 
> abbrev was
> triggered by a word that has some upper-case letters in it, 
> Emacs
> capitalizes the first letter of every word in the expansion (you 
> can
> optionally set abbrev-all-caps non-nil to up-case all the 
> letters in
> the expansion).  In your case, capitalizing the first letter of 
> "aBC"
> yields "ABC", and that's what you see.
>
> What did you expect to happen instead?

I would expect *nothing* to happen; abbrev is key-value mapping; 
you
write a key and it replaces it with a value. If you write a word 
that
is not a key, you expect nothing to happen. In this case, the word 
is
one of the values, and suddenly something happens, unexpectedly. I
know realize that words are compared with keys ignoring the case, 
but
using the case in the expansion. Still, if a user writes a word
identical to one the abbrev "keys", I would expect abbrev to leave 
it
as is. 

Thanks, 

Daniel




This bug report was last modified 2 years and 39 days ago.

Previous Next


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