# HG changeset patch # User Katsumi Yamaoka # Date 1289447427 0 # Node ID 4c3fdb97fdaf849cc09d4f0bc8f092714583d4fc # Parent 54d60cee2d5c06e1c0071ad3e71ca6d71dc8d833 shr.el (shr-insert): Don't break long line if it is because of kinsoku-bol characters in the line end. diff -r 54d60cee2d5c -r 4c3fdb97fdaf lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Wed Nov 10 19:50:20 2010 -0800 +++ b/lisp/gnus/ChangeLog Thu Nov 11 03:50:27 2010 +0000 @@ -1,3 +1,8 @@ +2010-11-11 Katsumi Yamaoka + + * 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 * nnir.el (nnir-request-move-article): Fix to provide original group diff -r 54d60cee2d5c -r 4c3fdb97fdaf lisp/gnus/shr.el --- a/lisp/gnus/shr.el Wed Nov 10 19:50:20 2010 -0800 +++ b/lisp/gnus/shr.el Thu Nov 11 03:50:27 2010 +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)))))