commit b19a69c6d40257145d9a65ef121439b18168c7ba
parent 0d88ce1de7514ab7e9784ab89978e39fa7ed2786
Author: Iqbal Ansari <iqbalansari02@yahoo.com>
Date: Sun, 18 Sep 2016 12:33:12 +0530
Fix compatibility with Emacs 24.3
- Do not fail if `subr-x` is not available
- Do not enable `jit-lock-debug-mode` if it is not available
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/emojify.el b/emojify.el
@@ -39,7 +39,7 @@
(require 'seq)
(require 'ht)
-(require 'subr-x nil)
+(require 'subr-x nil :no-error)
(require 'json)
(require 'regexp-opt)
(require 'jit-lock)
@@ -137,8 +137,10 @@ fail. This also turns on jit-debug-mode so that (e)debugging emojify's redisplay
functions work."
:init-value nil
(if emojify-debug-mode
- (jit-lock-debug-mode +1)
- (jit-lock-debug-mode -1)))
+ (when (fboundp 'jit-lock-debug-mode)
+ (jit-lock-debug-mode +1))
+ (when (fboundp 'jit-lock-debug-mode)
+ (jit-lock-debug-mode -1))))
(defmacro emojify-execute-ignoring-errors-unless-debug (&rest forms)
"Execute FORMS ignoring errors unless `emojify-debug-mode' is non-nil."