]> git.eshelyaron.com Git - emacs.git/commitdiff
Let ido-everywhere turn on ido-mode
authorNoam Postavsky <npostavs@users.sourceforge.net>
Wed, 19 Aug 2020 10:49:11 +0000 (12:49 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 19 Aug 2020 10:49:11 +0000 (12:49 +0200)
* lisp/ido.el (ido-everywhere): Turn on ido-mode, if it's not already
on.  Otherwise, having ido-everywhere enabled messes all file and
buffer reading interactive commands (bug#34292).

lisp/ido.el

index ad7500c0a1edcc80d9a8f31f08f55002bb2c3e7e..c83b700e656dc94432d98fa831d73a2c5d0645a7 100644 (file)
@@ -1523,8 +1523,10 @@ Removes badly formatted data and ignored directories."
   (remove-function read-file-name-function #'ido-read-file-name)
   (remove-function read-buffer-function #'ido-read-buffer)
   (when ido-everywhere
-    (add-function :override read-file-name-function #'ido-read-file-name)
-    (add-function :override read-buffer-function #'ido-read-buffer)))
+    (if (not ido-mode)
+        (ido-mode 'both)
+      (add-function :override read-file-name-function #'ido-read-file-name)
+      (add-function :override read-buffer-function #'ido-read-buffer))))
 
 (defvar ido-minor-mode-map-entry nil)