[gnus git] branch no-gnus updated: m0-1-87-ga672f83 =1= Slight shr cleanups

Lars Magne Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  a672f837dc481157a0ff41183a38f2b04d8561c2 (commit)
      from  72286f4679b3980964cbe4584c259760b2d4a941 (commit)


- Log -----------------------------------------------------------------
commit a672f837dc481157a0ff41183a38f2b04d8561c2
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Wed Mar 14 20:03:25 2012 +0100

    Slight shr cleanups
    
    (shr-natural-width): Removed.
    (shr-buffer-width): New function.
    (shr-expand-newlines): Use it.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index dad8fdf..4adb798 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -7,6 +7,9 @@
 	(shr-insert): Allow the natural width to be computed for tables again.
 	(shr-tag-table-1): Rework how the natural widths are computed by
 	rendering the table a third time.
+	(shr-natural-width): Removed.
+	(shr-buffer-width): New function.
+	(shr-expand-newlines): Use it.
 
 	* gnus-msg.el (gnus-bug): Don't delete the other windows.  We may be
 	using a `gnus-use-full-window' setup (bug#11013).
diff --git a/lisp/shr.el b/lisp/shr.el
index b4e3ec6..53c0063 100644
--- a/lisp/shr.el
+++ b/lisp/shr.el
@@ -340,7 +340,6 @@ the URL of the image to the kill buffer instead."
 	  (when (eq (preceding-char) ? )
 	    (delete-char -1))
 	  (insert "\n")
-	  (put-text-property (1- (point)) (point) 'shr-break t)
 	  (unless found
 	    ;; No space is needed at the beginning of a line.
 	    (when (eq (following-char) ? )
@@ -711,7 +710,7 @@ ones, in case fg and bg are nil."
     (forward-line 1)
     (setq end (point))
     (narrow-to-region start end)
-    (let ((width (shr-natural-width))
+    (let ((width (shr-buffer-width))
 	  column)
       (goto-char (point-min))
       (while (not (eobp))
@@ -1314,17 +1313,12 @@ ones, in case fg and bg are nil."
 		  (car actual-colors))
 	  max)))))
 
-(defun shr-natural-width ()
+(defun shr-buffer-width ()
   (goto-char (point-min))
-  (let ((current 0)
-	(max 0))
+  (let ((max 0))
     (while (not (eobp))
       (end-of-line)
-      (setq current (+ current (current-column)))
-      (if (get-text-property (point) 'shr-break)
-	  (incf current)
-	(setq max (max max current)
-	      current 0))
+      (setq max (max max (current-column)))
       (forward-line 1))
     max))
 

-----------------------------------------------------------------------
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 |    3 +++
 lisp/shr.el    |   14 ++++----------
 2 files changed, 7 insertions(+), 10 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, no-gnus 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.