From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: [PATCH] Replace latin-1-specific case-manipulation Date: Wed, 20 Feb 2019 15:26:45 +0100 Message-ID: <23807310-A2F9-4322-8A2C-03A63EFFD2AE@acm.org> Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="161709"; mail-complaints-to="usenet@blaine.gmane.org" To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 20 17:09:46 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gwURO-000fxU-6u for ged-emacs-devel@m.gmane.org; Wed, 20 Feb 2019 17:09:46 +0100 Original-Received: from localhost ([127.0.0.1]:41687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwURN-0004qD-3b for ged-emacs-devel@m.gmane.org; Wed, 20 Feb 2019 11:09:45 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwTzf-0005Ea-NF for emacs-devel@gnu.org; Wed, 20 Feb 2019 10:41:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwTzQ-0000GA-CF for emacs-devel@gnu.org; Wed, 20 Feb 2019 10:41:00 -0500 Original-Received: from mail224c50.megamailservers.eu ([91.136.10.234]:47814 helo=mail33c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwTzF-0007mi-4L for emacs-devel@gnu.org; Wed, 20 Feb 2019 10:40:43 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1550672807; bh=+jBdw5npIt4Ja8SLY7Oa/HQGXf9Bb2eWcmBUSsLSh6g=; h=From:Subject:Date:To:From; b=bwogJS+y2uVktvDJeQ2y5/lMmDuidLc9uZ+Nyl6T2gr4W85Mn9nxJldn3RHx14Mdk CbtKErRJYZn4BTi6ZDw8wiOAeQnnpjXRpruaLlWdwyrHgwNYlQX6bRbP5I7Ks4Frwt U8deczSctYB1CckkcCV1CaTxQwv0ZrMfjZDBl3/4= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.1.65] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail33c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x1KEQjHl002596 for ; Wed, 20 Feb 2019 14:26:47 +0000 X-Mailer: Apple Mail (2.3445.102.3) X-CTCH-RefID: str=0001.0A0B020C.5C6D63A7.002F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=fZaDNXYF c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=kj9zAlcOel0A:10 a=-Owg5bHr2r7YpGw89oIA:9 a=CjuIK1q_8ugA:10 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 91.136.10.234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:233485 Archived-At: There is some broken case-manipulation code from the latin-1 era in = cmpl-coerce-string-case. OK to apply? --- Replace latin-1-specific case-manipulation * lisp/completion.el (cmpl-coerce-string-case): Rewrite case-changing code written for latin-1 but not valid today. diff --git a/lisp/completion.el b/lisp/completion.el index 14ecc9b83d..1073ae8915 100644 --- a/lisp/completion.el +++ b/lisp/completion.el @@ -409,10 +409,7 @@ Used to decide whether to save completions.") (defun cmpl-coerce-string-case (string case-type) (cond ((eq case-type :down) (downcase string)) ((eq case-type :up) (upcase string)) - ((eq case-type :capitalized) - (setq string (downcase string)) - (aset string 0 (logand ?\337 (aref string 0))) - string) + ((eq case-type :capitalized) (capitalize string)) (t string))) =20 (defun cmpl-merge-string-cases (string-to-coerce given-string)