unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Replace latin-1-specific case-manipulation
@ 2019-02-20 14:26 Mattias Engdegård
  2019-02-20 17:24 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Mattias Engdegård @ 2019-02-20 14:26 UTC (permalink / raw)
  To: emacs-devel

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)))
 
 (defun cmpl-merge-string-cases (string-to-coerce given-string)





^ permalink raw reply related	[flat|nested] 8+ messages in thread
[parent not found: <<23807310-A2F9-4322-8A2C-03A63EFFD2AE@acm.org>]

end of thread, other threads:[~2019-02-21 15:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-20 14:26 [PATCH] Replace latin-1-specific case-manipulation Mattias Engdegård
2019-02-20 17:24 ` Eli Zaretskii
2019-02-20 20:47   ` Mattias Engdegård
2019-02-21  3:37     ` Eli Zaretskii
2019-02-21  5:25       ` Drew Adams
2019-02-21 14:37         ` Eli Zaretskii
2019-02-21  9:30       ` Mattias Engdegård
     [not found] <<23807310-A2F9-4322-8A2C-03A63EFFD2AE@acm.org>
     [not found] ` <<83va1egypa.fsf@gnu.org>
     [not found]   ` <<779A26F9-FE8F-477E-81BD-86200977E81D@acm.org>
     [not found]     ` <<83ef81hkwb.fsf@gnu.org>
     [not found]       ` <<b5545b1f-2488-4943-a063-09c25ace7b9b@default>
     [not found]         ` <<834l8xgqbx.fsf@gnu.org>
2019-02-21 15:23           ` Drew Adams

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).