Check Emacs version at start

I ran into this when I tried to use ghc-mod with Emacs 24.2, and
got a mysterious error telling me that defvar-local was not defined.
This commit is contained in:
Bryan O'Sullivan 2014-04-30 16:19:23 -07:00
parent 9c63d53dd5
commit 0650cbd359
1 changed files with 8 additions and 0 deletions

View File

@ -20,6 +20,14 @@
;;; Code:
;; defvar-local was introduced in 24.3
(let* ((major 24)
(minor 3))
(if (or (< emacs-major-version major)
(and (= emacs-major-version major)
(< emacs-minor-version minor)))
(error "ghc-mod requires at least Emacs %d.%d" major minor)))
(defconst ghc-version "4.1.0")
;; (eval-when-compile