branch: elpa/datetime
commit 3ecf9985250ecd441e91614b44cf12323af907c0
Author: Paul Pogonyshev <pogonys...@gmail.com>
Commit: Paul Pogonyshev <pogonys...@gmail.com>

    Add a workaround for missing 'define-error' on older Emacs versions; fixes 
#1.
---
 datetime.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/datetime.el b/datetime.el
index 9c18a18395..d1ac7dcd18 100644
--- a/datetime.el
+++ b/datetime.el
@@ -4,7 +4,7 @@
 
 ;; Author:     Paul Pogonyshev <pogonys...@gmail.com>
 ;; Maintainer: Paul Pogonyshev <pogonys...@gmail.com>
-;; Version:    0.2
+;; Version:    0.2.1
 ;; Keywords:   lisp, i18n
 ;; Homepage:   https://github.com/doublep/datetime
 ;; Package-Requires: ((emacs "24.1"))
@@ -86,7 +86,10 @@
 ;;   timezone (?) -- currently not supported further than pattern parsing
 
 
-(define-error 'datetime-unsupported-timezone "Timezones are currently not 
supported")
+(if (fboundp 'define-error)
+    (define-error 'datetime-unsupported-timezone "Timezones are currently not 
supported")
+  (put 'datetime-unsupported-timezone 'error-conditions 
'(datetime-unsupported-timezone error))
+  (put 'datetime-unsupported-timezone 'error-message "Timezones are currently 
not supported"))
 
 
 ;; Set at the end of this file because the initializer is huge.

Reply via email to