unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Daniel Fleischer <danflscr@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 63438@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	[thread overview]
Message-ID: <m2y1lvz117.fsf@gmail.com> (raw)
In-Reply-To: <83sfc35kzc.fsf@gnu.org>


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





  reply	other threads:[~2023-05-11  9:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11  7:10 bug#63438: 30.0.50; abbrev mode wrongly capitalizes with mixed capitalized words Daniel Fleischer
2023-05-11  8:29 ` Eli Zaretskii
2023-05-11  9:00   ` Daniel Fleischer [this message]
2023-05-11 10:39     ` Eli Zaretskii
2023-05-11 11:03       ` Daniel Fleischer
2023-05-11 11:28         ` Daniel Fleischer
2023-05-11 13:09           ` Eli Zaretskii
2023-05-11 13:07         ` Eli Zaretskii
2023-05-11 11:45 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-11 14:18   ` Daniel Fleischer
2023-05-11 15:49     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2y1lvz117.fsf@gmail.com \
    --to=danflscr@gmail.com \
    --cc=63438@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).