[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12615: 24.2.50; Non-ignored case in insert-char
From: |
Stefan Monnier |
Subject: |
bug#12615: 24.2.50; Non-ignored case in insert-char |
Date: |
Wed, 10 Oct 2012 20:56:00 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
> 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.
Stefan
=== modified file 'lisp/international/mule-cmds.el'
--- lisp/international/mule-cmds.el 2012-09-25 18:47:18 +0000
+++ lisp/international/mule-cmds.el 2012-10-11 00:54:27 +0000
@@ -2958,13 +2958,14 @@
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* ((completion-ignore-case t)
- (input (completing-read
+ (let ((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))