From 00364d8093c4f31acfeecbcd682eda536b907952 Mon Sep 17 00:00:00 2001
From: Per Cederqvist <ceder@lysator.liu.se>
Date: Mon, 17 Aug 2020 11:37:16 +0200
Subject: [PATCH] Fix Emacs 27.1 incompatibility in lyskom-subtract-one-day

Keep any sub-second time elements unchanged, so that we return a valid
time format in lyskom-subtract-one-day.  Emacs 27.1 expects it to be
on the (HI LO US PS) form, and decode-time will raise an error if it
is on the (HI LO nil) form that lyskom-subtract-one-day previously
returned.
---
 src/ChangeLog    | 9 +++++++++
 src/view-text.el | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 01163fc5..676d03cb 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
+2020-08-17  Per Cederqvist  <ceder@lysator.liu.se>
+
+	Emacs 27.1 compatibility.
+	* view-text.el (lyskom-subtract-one-day): Keep any sub-second time
+	elements unchanged, so that we return a valid time format.  Emacs
+	27.1 expects it to be on the (HI LO US PS) form, and decode-time
+	will raise an error if it is on the (HI LO nil) form that
+	lyskom-subtract-one-day previously returned.
+
 2019-08-08  Per Cederqvist  <cederp@opera.com>
 
 	Insert links to jskom when an image cannot be displayed.
diff --git a/src/view-text.el b/src/view-text.el
index e3de9cfd..da8bdaeb 100644
--- a/src/view-text.el
+++ b/src/view-text.el
@@ -716,7 +716,7 @@ blocking-do."
         (setq high-x (1- high-x)
               low-x (+ low-x 65536)))
     (setq low-x (- low-x 20864))
-    (list high-x low-x nil)))
+    (cons high-x (cons low-x (cdr (cdr x))))))
 
 (defun lyskom-calculate-day-diff (time)
   (let* ((now (current-time))
-- 
GitLab