bug-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: Juri Linkov
Subject: bug#12615: 24.2.50; Non-ignored case in insert-char
Date: Sun, 30 Dec 2012 00:56:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

>> Some observations: C-x 8 C-m is bound to insert-char, a C function.
>> And insert-char calls read-char-by-name, which let-binds
>> completion-ignore-case to t.  The clear intention is that unicode name
>> searches should always be case insensitive, and this seems always to
>> be the case if completion-ignore-case is not buffer local.
>
> Indeed, a buffer-local setting of completion-ignore-case can
> bring surprises.  I think the patch below will fix this problem for this
> particular case.

I just stumbled upon the case where this fix causes the regression:
typing `C-x 8 RET *acc TAB' results in "[No match]".

I don't know why this case disobeys the let-binding of
`completion-ignore-case' and whether a simpler fix is possible,
but at least this patch fixes it for the emacs-24 branch:

=== modified file 'lisp/international/mule-cmds.el'
--- lisp/international/mule-cmds.el     2012-10-11 20:05:47 +0000
+++ lisp/international/mule-cmds.el     2012-12-29 22:45:12 +0000
@@ -2946,10 +2946,12 @@ (defun read-char-by-name (prompt)
 point or a number in hash notation, e.g. #o21430 for octal,
 #x2318 for hex, or #10r8984 for decimal."
   (let ((input
+         (minibuffer-with-setup-hook
+            (lambda ()
+              (set (make-local-variable 'completion-ignore-case) t))
          (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)))))))






reply via email to

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