Permalink
Browse files

Warn when Smex is loaded on incompatible Emacsen

Fixes #36

Thanks to Steve Purcell for suggesting this patch
  • Loading branch information...
1 parent 0fc84c0 commit ab59af59eccbaa02c35afcc81753dd1a2f8dd54c @nonsequitur committed Jan 31, 2014
Showing with 6 additions and 0 deletions.
  1. +6 −0 smex.el
View
@@ -73,6 +73,12 @@ Set this to nil to disable fuzzy matching."
(defvar smex-command-count 0)
(defvar smex-custom-action nil)
+;; Check if Smex is supported
+(when (equal (cons 1 1)
+ (ignore-errors
+ (subr-arity (symbol-function 'execute-extended-command))))
+ (error "Your Emacs has a non-elisp version of `execute-extended-command', which is incompatible with Smex"))
+
;;--------------------------------------------------------------------------------
;; Smex Interface

1 comment on commit ab59af5

@purcell
Contributor

Yay, happy to help. Thanks again for smex.

Please sign in to comment.