]> code.delx.au - gnu-emacs-elpa/commitdiff
counsel.el (counsel-M-x): Fixup smex interaction
authorOleh Krehel <ohwoeowho@gmail.com>
Wed, 17 Jun 2015 08:01:36 +0000 (10:01 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Wed, 17 Jun 2015 08:01:36 +0000 (10:01 +0200)
* counsel.el (counsel-M-x): Use `smex-rank' only if smex is installed.

Fixes #147

counsel.el

index 33af3a13f96e4176b5094f0fb5caf30cf0c8e654..af2acb7d47361e7feff661a946154c3cd11e93bf 100644 (file)
@@ -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