branch: master
commit bcc5f452276b6ba27f9735bb55c8e088bda5cc49
Author: Oleh Krehel <ohwoeo...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    counsel.el (counsel-M-x): Fixup smex interaction
    
    * counsel.el (counsel-M-x): Use `smex-rank' only if smex is installed.
    
    Fixes #147
---
 counsel.el |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/counsel.el b/counsel.el
index 33af3a1..af2acb7 100644
--- a/counsel.el
+++ b/counsel.el
@@ -529,7 +529,8 @@ Optional INITIAL-INPUT is the initial input in the 
minibuffer."
               :history 'extended-command-history
               :action
               (lambda (cmd)
-                (smex-rank (intern cmd))
+                (when (featurep 'smex)
+                  (smex-rank (intern cmd)))
                 (execute-extended-command current-prefix-arg cmd))
               :sort sort
               :keymap counsel-describe-map

Reply via email to