diff lisp/gnus/gnus-sum.el @ 109765:416af1df94a4

Make saving and restoring of hidden threads work with overlays. Patch applied by Ted Zlatanov. * gnus-sum.el (gnus-hidden-threads-configuration) (gnus-restore-hidden-threads-configuration): Update to deal with text properties, rather than searching for a magic character.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Fri, 13 Aug 2010 10:44:22 +0000
parents 20f9503a8859
children 93dfb9cac00f
line wrap: on
line diff
--- a/lisp/gnus/gnus-sum.el	Fri Aug 13 10:39:16 2010 +0000
+++ b/lisp/gnus/gnus-sum.el	Fri Aug 13 10:44:22 2010 +0000
@@ -3406,8 +3406,10 @@
   (save-excursion
     (let (config)
       (goto-char (point-min))
-      (while (search-forward "\r" nil t)
-	(push (1- (point)) config))
+      (while (not (eobp))
+        (when (eq (get-char-property (point-at-eol) 'invisible) 'gnus-sum)
+          (push (save-excursion (forward-line 0) (point)) config))
+        (forward-line 1))
       config)))
 
 (defun gnus-restore-hidden-threads-configuration (config)
@@ -3415,10 +3417,8 @@
   (save-excursion
     (let (point (inhibit-read-only t))
       (while (setq point (pop config))
-	(when (and (< point (point-max))
-		   (goto-char point)
-		   (eq (char-after) ?\n))
-	  (subst-char-in-region point (1+ point) ?\n ?\r))))))
+        (goto-char point)
+        (gnus-summary-hide-thread)))))
 
 ;; Various summary mode internalish functions.