GNU bug report logs - #12615
24.2.50; Non-ignored case in insert-char

Previous Next

Package: emacs;

Reported by: Harald Hanche-Olsen <hanche <at> math.ntnu.no>

Date: Wed, 10 Oct 2012 15:39:02 UTC

Severity: normal

Found in version 24.2.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 12615 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Harald Hanche-Olsen <hanche <at> math.ntnu.no>
Cc: 12615 <at> debbugs.gnu.org
Subject: Re: bug#12615: 24.2.50; Non-ignored case in insert-char
Date: Wed, 10 Oct 2012 20:56:00 -0400
> 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))





This bug report was last modified 3 years and 36 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.