diff options
| author | Katsumi Yamaoka | 2010-11-11 03:50:27 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2010-11-11 03:50:27 +0000 |
| commit | e7102c0aca8b0834931c8d7533ffa58654dd7655 (patch) | |
| tree | ca2664986c8dad3b2354fe8b7d794022658f5d0d | |
| parent | 77d6bce84b87635cab4bd9c42cf794fbb1df42f5 (diff) | |
| download | emacs-e7102c0aca8b0834931c8d7533ffa58654dd7655.tar.gz emacs-e7102c0aca8b0834931c8d7533ffa58654dd7655.zip | |
shr.el (shr-insert): Don't break long line if it is because of kinsoku-bol characters in the line end.
| -rw-r--r-- | lisp/gnus/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/gnus/shr.el | 32 |
2 files changed, 23 insertions, 14 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index b1ef4be01a6..948a382bfb5 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-11-11 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * shr.el (shr-insert): Don't break long line if it is because of | ||
| 4 | kinsoku-bol characters in the line end. | ||
| 5 | |||
| 1 | 2010-11-11 Andrew Cohen <cohen@andy.bu.edu> | 6 | 2010-11-11 Andrew Cohen <cohen@andy.bu.edu> |
| 2 | 7 | ||
| 3 | * nnir.el (nnir-request-move-article): Fix to provide original group | 8 | * nnir.el (nnir-request-move-article): Fix to provide original group |
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index e0ea76c0930..88e078b066f 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el | |||
| @@ -235,20 +235,24 @@ redirects somewhere else." | |||
| 235 | (aref elem 0))))) | 235 | (aref elem 0))))) |
| 236 | (delete-char -1))) | 236 | (delete-char -1))) |
| 237 | (insert elem) | 237 | (insert elem) |
| 238 | (while (> (current-column) shr-width) | 238 | (let (found) |
| 239 | (unless (prog1 | 239 | (while (and (> (current-column) shr-width) |
| 240 | (shr-find-fill-point) | 240 | (progn |
| 241 | (when (eq (preceding-char) ? ) | 241 | (setq found (shr-find-fill-point)) |
| 242 | (delete-char -1)) | 242 | (not (eolp)))) |
| 243 | (insert "\n")) | 243 | (unless (prog1 |
| 244 | (put-text-property (1- (point)) (point) 'shr-break t) | 244 | found |
| 245 | ;; No space is needed at the beginning of a line. | 245 | (when (eq (preceding-char) ? ) |
| 246 | (when (eq (following-char) ? ) | 246 | (delete-char -1)) |
| 247 | (delete-char 1))) | 247 | (insert "\n")) |
| 248 | (when (> shr-indentation 0) | 248 | (put-text-property (1- (point)) (point) 'shr-break t) |
| 249 | (shr-indent)) | 249 | ;; No space is needed at the beginning of a line. |
| 250 | (end-of-line)) | 250 | (when (eq (following-char) ? ) |
| 251 | (insert " ")) | 251 | (delete-char 1))) |
| 252 | (when (> shr-indentation 0) | ||
| 253 | (shr-indent)) | ||
| 254 | (end-of-line)) | ||
| 255 | (insert " "))) | ||
| 252 | (unless (string-match "[ \t\n]\\'" text) | 256 | (unless (string-match "[ \t\n]\\'" text) |
| 253 | (delete-char -1))))) | 257 | (delete-char -1))))) |
| 254 | 258 | ||