[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: |
Thu, 10 Jan 2013 02:24:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) |
reopen 12615
thanks
>> I'd guess only completing-read would need to do it, rather than
>> read_minibuf.
>
> Then `completing-read-default' would be a good place too
> (anyone who overrides `completing-read-function' have to copy most of
> code from `completing-read-default' anyway).
I tried to do this in `completing-read-default', and it seems to fix the
reported problem, and (make-local-variable 'completion-ignore-case) in
the *scratch* buffer doesn't override the let-binding in `read-char-by-name':
=== modified file 'lisp/minibuffer.el'
--- lisp/minibuffer.el 2013-01-03 00:36:36 +0000
+++ lisp/minibuffer.el 2013-01-10 00:23:05 +0000
@@ -3202,8 +3202,16 @@ (defun completing-read-default (prompt c
;; in minibuffer-local-filename-completion-map can
;; override bindings in base-keymap.
base-keymap)))
- (result (read-from-minibuffer prompt initial-input keymap
- nil hist def inherit-input-method)))
+ ;; Get the value of `completion-ignore-case' from the original
+ ;; buffer where it is either buffer-local or let-bound.
+ (c-i-c completion-ignore-case)
+ (result
+ (minibuffer-with-setup-hook
+ (lambda ()
+ ;; Copy the value from original buffer to the minibuffer.
+ (set (make-local-variable 'completion-ignore-case) c-i-c))
+ (read-from-minibuffer prompt initial-input keymap
+ nil hist def inherit-input-method))))
(when (and (equal result "") def)
(setq result (if (consp def) (car def) def)))
result))