branch: elpa/datetime commit da0727d0169f8ef043635755e3473ce22df72b70 Author: Paul Pogonyshev <pogonys...@gmail.com> Commit: Paul Pogonyshev <pogonys...@gmail.com>
Repair testing on ancient Emacs versions after the latest commit. --- test/base.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/base.el b/test/base.el index e78b1d05ad..0f843911cd 100644 --- a/test/base.el +++ b/test/base.el @@ -50,9 +50,13 @@ (defvar datetime--test-parser nil) (defvar datetime--test-matcher nil) +;; To silence byte-compilation warnings on Emacs 24-25. +(defvar byte-compile-log-warning-function) + (defmacro datetime--test-with-strict-byte-compiler (&rest body) (declare (debug (body)) (indent 0)) - `(let* ((original-warning-function byte-compile-log-warning-function) + `(let* ((original-warning-function (when (boundp 'byte-compile-log-warning-function) byte-compile-log-warning-function)) + ;; Don't care much if the variable is unused on ancient Emacs versions. (byte-compile-log-warning-function (lambda (string &optional position fill level &rest etc) (when (eq level :warning) (error "Strict byte-compilation failure: %s" string))