From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63438: 30.0.50; abbrev mode wrongly capitalizes with mixed capitalized words Date: Thu, 11 May 2023 11:29:59 +0300 Message-ID: <83sfc35kzc.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28079"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63438@debbugs.gnu.org To: Daniel Fleischer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 11 10:30:17 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1px1gm-000777-Rc for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 May 2023 10:30:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1px1ga-0002Zq-9U; Thu, 11 May 2023 04:30:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px1gZ-0002ZV-Hc for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 04:30:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1px1gZ-0006Af-8C for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 04:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1px1gY-0006Nb-Ln for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 04:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 May 2023 08:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63438 X-GNU-PR-Package: emacs Original-Received: via spool by 63438-submit@debbugs.gnu.org id=B63438.168379374324424 (code B ref 63438); Thu, 11 May 2023 08:30:02 +0000 Original-Received: (at 63438) by debbugs.gnu.org; 11 May 2023 08:29:03 +0000 Original-Received: from localhost ([127.0.0.1]:49670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px1fb-0006Lk-AO for submit@debbugs.gnu.org; Thu, 11 May 2023 04:29:03 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px1fV-0006LB-AX; Thu, 11 May 2023 04:29:00 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px1fQ-00060y-1D; Thu, 11 May 2023 04:28:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=l/A2YVHkJgLvYEkWR91W7+8YiW8wJi6wDQ74DEaYN3g=; b=ODUUgMcBKc+1 TQ2VmC0gY5sgKrTi6Wahhu+oEUh0fpJ9fwp3BNaj7zql3ShiAfYNF2d4Av6Z6EJmRrDsMfU0JGdXs 4CK18FJNOwUFEdl5uagcLYVyM6LySiVbY+kPRvOuW4zhDqB57rLNqdWnibuTLr5f5djOcGqEIjXA4 GjBORnqQ492zcE2z0ikkjAliZ9bdFsAShH6mVzmsOgjNcgL/pVBjuAPxcEePq+q2ZuI66osZVzVAH BaiGBY+2QSxSwQ33gqeYJ9zLVjYcmrgseeaCLPE+CZQOWptaGGaDRG1PnyVxyI3ME9vZrOX9ZihFs g+xaDfOTJEE2nyTwKUdn4A==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px1fP-00037Z-H1; Thu, 11 May 2023 04:28:51 -0400 In-Reply-To: (message from Daniel Fleischer on Thu, 11 May 2023 10:10:40 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261551 Archived-At: severity 63438 wishlist thanks > From: Daniel Fleischer > Date: Thu, 11 May 2023 10:10:40 +0300 > > Recipe for recreating: > > - Add some abbrev definition with mixed capitalization, e.g. "abc" > should expand to "aBC". > - Enable abbrev-mode. > - Write "aBC". > - Upon pressing space, abbrev-mode converts it into "ABC". > > There is a code section in `abbrev-insert' that explicitly capitalizes > the first letter; I'm sure it's there for a reason but I think the > behavior I showed is unexpected. As for the example "aBC", there are > real use cases, just to mention one "iPhone". 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?