]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid fido-mode's setup on non-icomplete minibuffers
authorJoão Távora <joaotavora@gmail.com>
Wed, 13 Nov 2019 09:47:25 +0000 (09:47 +0000)
committerJoão Távora <joaotavora@gmail.com>
Wed, 13 Nov 2019 09:49:47 +0000 (09:49 +0000)
Otherwise we would lose things like C-r (isearch-backward) when doing
simple stuff like non-icomplete pp-eval-expression.

* lisp/icomplete.el (icomplete--fido-mode-setup): Restrict setup
to when icomplete-mode really kicks in.

lisp/icomplete.el

index d0d3d65c3466c7fde936c2b488ce7f8b54dc190a..a732d4cc0d1c1152234e0d554b1699b935732677 100644 (file)
@@ -319,13 +319,14 @@ require user confirmation."
 
 (defun icomplete--fido-mode-setup ()
   "Setup `fido-mode''s minibuffer."
-  (use-local-map (make-composed-keymap icomplete-fido-mode-map
-                                       (current-local-map)))
-  (setq-local icomplete-tidy-shadowed-file-names t
-              icomplete-show-matches-on-no-input t
-              icomplete-hide-common-prefix nil
-              completion-styles '(flex)
-              completion-category-defaults nil))
+  (when (and icomplete-mode (icomplete-simple-completing-p))
+    (use-local-map (make-composed-keymap icomplete-fido-mode-map
+                                         (current-local-map)))
+    (setq-local icomplete-tidy-shadowed-file-names t
+                icomplete-show-matches-on-no-input t
+                icomplete-hide-common-prefix nil
+                completion-styles '(flex)
+                completion-category-defaults nil)))
 
 ;;;###autoload
 (define-minor-mode fido-mode