Make saving and restoring of hidden threads work with overlays.
authorTed Zlatanov <tzz@lifelogs.com>
Thu, 12 Aug 2010 20:12:01 +0000 (15:12 -0500)
committerTed Zlatanov <tzz@lifelogs.com>
Thu, 12 Aug 2010 20:12:01 +0000 (15:12 -0500)
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.

lisp/ChangeLog
lisp/gnus-sum.el

index 617c4a5..ce7849e 100644 (file)
@@ -1,5 +1,16 @@
+2010-07-30  Lawrence Mitchell  <wence@gmx.li>
+
+       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.
+
 2010-08-12  Teodor Zlatanov  <tzz@lifelogs.com>
 
+       New gnus-sync.el library for synchronization of marks.
+
        * gnus-sync.el: New library for synchronization of marks.
 
        * gnus-util.el (gnus-grep-in-list): Moved from gnus-registry.el and
index 93024e0..53a2470 100644 (file)
@@ -3406,8 +3406,10 @@ marks of articles."
   (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 @@ marks of articles."
   (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.