[gnus git] branch master updated: =2= Limit the number of segments dynamically to avoid too-long lines. ; (article-update-date-lapsed): Skip past all the X-Sent/Date headers.

Lars Magne Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  2b4fe5a591927e60593e5d8f8ad6c099700ac13d (commit)
       via  1f6568b63fe52a00b0f1d3881f2376f8f1a3f6c0 (commit)
      from  ab577a732d12f8d80ea12ae7d60b62fc451334c0 (commit)


- Log -----------------------------------------------------------------
commit 2b4fe5a591927e60593e5d8f8ad6c099700ac13d
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Thu Jan 27 15:34:35 2011 -0800

    Limit the number of segments dynamically to avoid too-long lines.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1cb82c1..0fd2756 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -5,6 +5,8 @@
 	(article-update-date-lapsed): Allow updating both the combined lapsed
 	and the lapsed headers.
 	(article-update-date-lapsed): Skip past all the X-Sent/Date headers.
+	(article-make-date-line): Limit the number of segments dynamically to
+	avoid too-long lines.
 
 2011-01-27  Julien Danjou  <[email protected]>
 
diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el
index b7a751e..2960e8f 100644
--- a/lisp/gnus-art.el
+++ b/lisp/gnus-art.el
@@ -3570,8 +3570,20 @@ should replace the \"Date:\" one, or should be added below it."
 	  (concat "X-Sent: " (article-lapsed-string time)))
 	 ;; A combined date/lapsed format.
 	 ((eq type 'combined-lapsed)
-	  (concat (article-make-date-line date 'original)
-		  " (" (article-lapsed-string time 3) ")"))
+	  (let ((date-string (article-make-date-line date 'original))
+		(segments 3)
+		lapsed-string)
+	    (while (and
+		    (setq lapsed-string
+			  (concat " (" (article-lapsed-string time segments) ")"))
+		    (> (+ (length date-string)
+			  (length lapsed-string))
+		       (+ fill-column 10))
+		    (> segments 0))
+	      (setq segments (1- segments)))
+	    (if (> segments 0)
+		(concat date-string lapsed-string)
+	      date-string)))
 	 ;; Display the date in proper English
 	 ((eq type 'english)
 	  (let ((dtime (decode-time time)))

commit 1f6568b63fe52a00b0f1d3881f2376f8f1a3f6c0
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Thu Jan 27 15:16:16 2011 -0800

    (article-update-date-lapsed): Skip past all the X-Sent/Date headers.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9842acd..1cb82c1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -2,6 +2,9 @@
 
 	* gnus-art.el (article-update-date-lapsed): Ensure that point stays at
 	the "same place" even if point is on the line being replaced.
+	(article-update-date-lapsed): Allow updating both the combined lapsed
+	and the lapsed headers.
+	(article-update-date-lapsed): Skip past all the X-Sent/Date headers.
 
 2011-01-27  Julien Danjou  <[email protected]>
 
diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el
index c72c2fe..b7a751e 100644
--- a/lisp/gnus-art.el
+++ b/lisp/gnus-art.el
@@ -3689,10 +3689,16 @@ function and want to see what the date was before converting."
 		  ;; This will ensure that point stays at the "same
 		  ;; place".
 		  (when (or (< old-point (match-beginning 0))
-			    (> old-point (line-end-position)))
+			    (> old-point (progn
+					   (forward-line 1)
+					   (while (and (not (eobp))
+						       (looking-at "X-Sent:\\|Date:"))
+					     (forward-line))
+					   (point))))
 		    (setq old-point nil))
-		  (if gnus-treat-date-combined-lapsed
-		      (article-date-combined-lapsed t)
+		  (when gnus-treat-date-combined-lapsed
+		    (article-date-combined-lapsed t))
+		  (when gnus-treat-date-lapsed
 		    (article-date-lapsed t)))
 		(goto-char (or old-point (marker-position mark)))
 		(move-marker mark nil))))

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog   |    5 +++++
 lisp/gnus-art.el |   28 +++++++++++++++++++++++-----
 2 files changed, 28 insertions(+), 5 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.