emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Replace latin-1-specific case-manipulation


From: Mattias Engdegård
Subject: [PATCH] Replace latin-1-specific case-manipulation
Date: Wed, 20 Feb 2019 15:26:45 +0100

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)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]