]> git.eshelyaron.com Git - emacs.git/commitdiff
Allow completion-ignore-case to be buffer-local
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 22 Apr 2022 12:34:50 +0000 (14:34 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 22 Apr 2022 12:35:30 +0000 (14:35 +0200)
* lisp/minibuffer.el (completing-read-default): Use the value of
completion-ignore-case from the current buffer (bug#12615).

lisp/minibuffer.el

index e1947ae5ddb7d6c84b736650ed9186d2352fd516..198162266ee2c9d339f92a40419f4b206e317a0d 100644 (file)
@@ -4245,6 +4245,7 @@ See `completing-read' for the meaning of the arguments."
                     ;; override bindings in base-keymap.
                     base-keymap)))
          (buffer (current-buffer))
+         (c-i-c completion-ignore-case)
          (result
           (minibuffer-with-setup-hook
               (lambda ()
@@ -4254,7 +4255,9 @@ See `completing-read' for the meaning of the arguments."
                 (setq-local minibuffer-completion-confirm
                             (unless (eq require-match t) require-match))
                 (setq-local minibuffer--require-match require-match)
-                (setq-local minibuffer--original-buffer buffer))
+                (setq-local minibuffer--original-buffer buffer)
+                ;; Copy the value from original buffer to the minibuffer.
+                (setq-local completion-ignore-case c-i-c))
             (read-from-minibuffer prompt initial-input keymap
                                   nil hist def inherit-input-method))))
     (when (and (equal result "") def)