Give a try to smex.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 13 Oct 2016 21:11:11 +0300
changeset 1444 d91ea2220a52
parent 1443 d8600d7a6a66
child 1445 b1f7af188fa2
Give a try to smex.
.emacs-my
--- a/.emacs-my	Wed Oct 12 22:46:40 2016 +0300
+++ b/.emacs-my	Thu Oct 13 21:11:11 2016 +0300
@@ -1075,14 +1075,19 @@
 (global-set-key "\C-x\C-b" 'ibuffer)
 (global-set-key [s-insert] 'ibuffer)
 
-(require 'icomplete)
-
-(icomplete-mode 1)
+;; `smex' is  alternative for `icomplete'.
+;; https://github.com/nonsequitur/smex/
+;; It is based on `ido'.
+(ignore-errors
+  (require 'smex)
+  (smex-initialize)
+  (global-set-key (kbd "M-X") 'smex))
+
+(unless (featurep 'icomplete)
+  (require 'icomplete)
+  (icomplete-mode 1))
 (setq icomplete-with-completion-tables t)
 
-;; Another alternative to `icomplete' is `smex' https://github.com/nonsequitur/smex/
-;; which is based on `ido'.
-
 (defun my--large-file-p ()
   "If buffer too large and my cause performance issue."
   (< large-file-warning-threshold (buffer-size)))