Subject: Re: bug#12615: 24.2.50; Non-ignored case in insert-char

From: Juri Linkov <[email-masked]>
Date: Tue, 08 Jan 2013 02:45:45 +0200

In light of the incoming pretest I propose to fix the regression now in
the emacs-24 branch (the test case for the regression is `C-x 8 RET *acc TAB')
with the patch below, and later think about another fix for trunk
(I still have no idea for a better fix) that doesn't cause a regression.

=== modified file 'lisp/international/mule-cmds.el'
--- lisp/international/mule-cmds.el	2013-01-01 09:11:05 +0000
+++ lisp/international/mule-cmds.el	2013-01-06 00:19:17 +0000
@@ -2945,14 +2945,13 @@ (defun read-char-by-name (prompt)
 This function also accepts a hexadecimal number of Unicode code
 point or a number in hash notation, e.g. #o21430 for octal,
 #x2318 for hex, or #10r8984 for decimal."
-  (let ((input
-         (completing-read
+  (let* ((completion-ignore-case t)
+	 (input (completing-read
           prompt
           (lambda (string pred action)
-            (let ((completion-ignore-case t))
               (if (eq action 'metadata)
                   '(metadata (category . unicode-name))
-                (complete-with-action action (ucs-names) string pred)))))))
+                     (complete-with-action action (ucs-names) string pred))))))
     (cond
      ((string-match-p "\\`[0-9a-fA-F]+\\'" input)
       (string-to-number input 16))