emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r102333: shr.el (shr-insert): Don't b


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102333: shr.el (shr-insert): Don't break long line if it is because of kinsoku-bol characters in the line end.
Date: Thu, 11 Nov 2010 03:50:27 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102333
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Thu 2010-11-11 03:50:27 +0000
message:
  shr.el (shr-insert): Don't break long line if it is because of kinsoku-bol 
characters in the line end.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/shr.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2010-11-11 02:11:30 +0000
+++ b/lisp/gnus/ChangeLog       2010-11-11 03:50:27 +0000
@@ -1,3 +1,8 @@
+2010-11-11  Katsumi Yamaoka  <address@hidden>
+
+       * shr.el (shr-insert): Don't break long line if it is because of
+       kinsoku-bol characters in the line end.
+
 2010-11-11  Andrew Cohen  <address@hidden>
 
        * nnir.el (nnir-request-move-article): Fix to provide original group

=== modified file 'lisp/gnus/shr.el'
--- a/lisp/gnus/shr.el  2010-11-09 22:17:36 +0000
+++ b/lisp/gnus/shr.el  2010-11-11 03:50:27 +0000
@@ -235,20 +235,24 @@
                                  (aref elem 0)))))
          (delete-char -1)))
       (insert elem)
-      (while (> (current-column) shr-width)
-       (unless (prog1
-                   (shr-find-fill-point)
-                 (when (eq (preceding-char) ? )
-                   (delete-char -1))
-                 (insert "\n"))
-         (put-text-property (1- (point)) (point) 'shr-break t)
-         ;; No space is needed at the beginning of a line.
-         (when (eq (following-char) ? )
-           (delete-char 1)))
-       (when (> shr-indentation 0)
-         (shr-indent))
-       (end-of-line))
-      (insert " "))
+      (let (found)
+       (while (and (> (current-column) shr-width)
+                   (progn
+                     (setq found (shr-find-fill-point))
+                     (not (eolp))))
+         (unless (prog1
+                     found
+                   (when (eq (preceding-char) ? )
+                     (delete-char -1))
+                   (insert "\n"))
+           (put-text-property (1- (point)) (point) 'shr-break t)
+           ;; No space is needed at the beginning of a line.
+           (when (eq (following-char) ? )
+             (delete-char 1)))
+         (when (> shr-indentation 0)
+           (shr-indent))
+         (end-of-line))
+       (insert " ")))
     (unless (string-match "[ \t\n]\\'" text)
       (delete-char -1)))))
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]