Skip to content

Commit

Permalink
Warn when Smex is loaded on incompatible Emacsen
Browse files Browse the repository at this point in the history
Fixes #36

Thanks to Steve Purcell for suggesting this patch
  • Loading branch information
nonsequitur committed Jan 31, 2014
1 parent 0fc84c0 commit ab59af5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions smex.el
Expand Up @@ -73,6 +73,12 @@ Set this to nil to disable fuzzy matching."
(defvar smex-command-count 0) (defvar smex-command-count 0)
(defvar smex-custom-action nil) (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 ;; Smex Interface


Expand Down

1 comment on commit ab59af5

@purcell
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay, happy to help. Thanks again for smex.

Please sign in to comment.