From d3f0879b796c6f4ddbd0df674475a4534d74ebf5 Mon Sep 17 00:00:00 2001
From: Joel Rosdahl <joel@rosdahl.net>
Date: Thu, 18 Jan 2001 21:19:40 +0000
Subject: [PATCH] Keep viewed text in cache a bit longer so that it won't be
 prefetched a second time.

---
 src/ChangeLog    | 6 ++++++
 src/view-text.el | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index e950dd4c..51bedbf7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2001-01-18  Joel Rosdahl  <joel@rosdahl.net>
+
+	* view-text.el (lyskom-print-text): Keep viewed text in cache a
+	bit longer so that it won't be prefetched a second time.
+	(lyskom-view-text): Ditto.
+
 2001-01-02  Ulrik Haugen  <qha@lysator.liu.se>
 
 	* All files changed when I replaced
diff --git a/src/view-text.el b/src/view-text.el
index 26e070b7..0eae0df1 100644
--- a/src/view-text.el
+++ b/src/view-text.el
@@ -325,6 +325,8 @@ Note that this function must not be called asynchronously."
 			 (lyskom-follow-comments text-stat
 						 conf-stat mark-as-read
 						 priority build-review-tree)))
+                   (if (lyskom-text-p (cache-get-text text-no))
+                       (cache-del-text text-no))
 		   ))
 	       (lyskom-format-insert 'no-such-text-no text-no))
              (let ((aux-items (text-stat->aux-items text-stat)))
@@ -841,8 +843,6 @@ Args: TEXT-STAT TEXT MARK-AS-READ TEXT-NO FLAT-REVIEW."
           (lyskom-insert "\n")
           (lyskom-format-insert "%#1t\n" (cons text-stat str))
           (setq lyskom-current-subject "")))
-        (if (lyskom-text-p (cache-get-text (text->text-no text)))
-            (cache-del-text (text->text-no text)))
         (sit-for 0)
         (let* ((lyskom-current-function-phase 'footer)
                (mx-from (car (lyskom-get-aux-item (text-stat->aux-items text-stat) 17)))
-- 
GitLab