branch: externals/ebdb
commit 0b7038694a4d844581461c261d96a7cd5679ac51
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>
Check calling convention of encode-time, bump to 0.6.18
Fixes #91
* ebdb.el (ebdb-string): Pre emacs 26, `encode-time' was called with
separate list args; since then it is called with a single list arg.
Actually the old convention apparently still works, but this is future
proof.
---
ebdb.el | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/ebdb.el b/ebdb.el
index 748233c..b8332e3 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -2,7 +2,7 @@
;; Copyright (C) 2016-2020 Free Software Foundation, Inc.
-;; Version: 0.6.17
+;; Version: 0.6.18
;; Package-Requires: ((emacs "25.1") (cl-lib "0.5") (seq "2.15"))
;; Maintainer: Eric Abrahamsen <[email protected]>
@@ -2141,13 +2141,16 @@ Eventually this method will go away."
(cl-defmethod ebdb-string ((ann ebdb-field-anniversary))
(let* ((date (slot-value ann 'date))
- (encoded (encode-time
- ;; Why did I reverse the day month order?!
- `(0 0 0
- ,(nth 1 date)
- ,(car date)
- ,(or (nth 2 date) 0)
- nil nil nil))))
+ (bits `(0 0 0
+ ,(nth 1 date)
+ ,(car date)
+ ,(or (nth 2 date) 0)
+ nil nil nil))
+ (encoded (condition-case nil
+ (encode-time bits)
+ (wrong-number-of-arguments
+ ;; Emacs <=26
+ (apply #'encode-time bits)))))
(format-time-string
(if (nth 2 date)
ebdb-anniversary-ymd-format