Commit e7102c0a authored by Katsumi Yamaoka's avatar Katsumi Yamaoka
Browse files

shr.el (shr-insert): Don't break long line if it is because of kinsoku-bol...

shr.el (shr-insert): Don't break long line if it is because of kinsoku-bol characters in the line end.
parent 77d6bce8
2010-11-11 Katsumi Yamaoka <yamaoka@jpl.org>
* 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 <cohen@andy.bu.edu> 2010-11-11 Andrew Cohen <cohen@andy.bu.edu>
   
* nnir.el (nnir-request-move-article): Fix to provide original group * nnir.el (nnir-request-move-article): Fix to provide original group
......
...@@ -235,20 +235,24 @@ redirects somewhere else." ...@@ -235,20 +235,24 @@ redirects somewhere else."
(aref elem 0))))) (aref elem 0)))))
(delete-char -1))) (delete-char -1)))
(insert elem) (insert elem)
(while (> (current-column) shr-width) (let (found)
(unless (prog1 (while (and (> (current-column) shr-width)
(shr-find-fill-point) (progn
(when (eq (preceding-char) ? ) (setq found (shr-find-fill-point))
(delete-char -1)) (not (eolp))))
(insert "\n")) (unless (prog1
(put-text-property (1- (point)) (point) 'shr-break t) found
;; No space is needed at the beginning of a line. (when (eq (preceding-char) ? )
(when (eq (following-char) ? ) (delete-char -1))
(delete-char 1))) (insert "\n"))
(when (> shr-indentation 0) (put-text-property (1- (point)) (point) 'shr-break t)
(shr-indent)) ;; No space is needed at the beginning of a line.
(end-of-line)) (when (eq (following-char) ? )
(insert " ")) (delete-char 1)))
(when (> shr-indentation 0)
(shr-indent))
(end-of-line))
(insert " ")))
(unless (string-match "[ \t\n]\\'" text) (unless (string-match "[ \t\n]\\'" text)
(delete-char -1))))) (delete-char -1)))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment