From ca9880f98c58290a72dc5ad8efbe966bdea725a1 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Thu, 30 Sep 2010 23:55:34 +0200 Subject: [PATCH] (gnus-summary-show-thread): Skip past invisible text when expanding threads. From Jose A. Ortega Ruiz (tiny change) --- lisp/ChangeLog | 5 +++++ lisp/gnus-sum.el | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6216baf12..7070d10bd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-09-30 Jose A. Ortega Ruiz (tiny change) + + * gnus-sum.el (gnus-summary-show-thread): Skip past invisible text when + expanding threads. + 2010-09-30 Lars Magne Ingebrigtsen * nnir.el: Use the server names without suffixes (bug #7009). diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 4cd716803..cc1c3823c 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -11327,15 +11327,19 @@ For compatibility with XEmacs." (gnus-remove-overlays (point-min) (point-max) 'invisible 'gnus-sum) (gnus-summary-position-point)) +(defsubst gnus-summary--inv (p) + (and (eq (get-char-property p 'invisible) 'gnus-sum) p)) + (defun gnus-summary-show-thread () "Show thread subtrees. Returns nil if no thread was there to be shown." (interactive) (let* ((orig (point)) (end (point-at-eol)) + (end (or (gnus-summary--inv end) (gnus-summary--inv (1- end)))) ;; Leave point at bol (beg (progn (beginning-of-line) (if (bobp) (point) (1- (point))))) - (eoi (when (eq (get-char-property end 'invisible) 'gnus-sum) + (eoi (when end (if (fboundp 'next-single-char-property-change) (or (next-single-char-property-change end 'invisible) (point-max)) -- 2.25.1