diff options
| author | Katsumi Yamaoka | 2010-10-21 00:27:32 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2010-10-21 00:27:32 +0000 |
| commit | ab388ec43c479e38e465f82934b5a8148ec8121e (patch) | |
| tree | 78e5b371461a35c5c3af6fe85ba21bea46a51497 | |
| parent | 2526f423795632d123f3cd99e9aa45065b41745b (diff) | |
| download | emacs-ab388ec43c479e38e465f82934b5a8148ec8121e.tar.gz emacs-ab388ec43c479e38e465f82934b5a8148ec8121e.zip | |
nnrss.el (nnrss-wash-html-in-text-plain-parts): Remove.
nnrss.el (nnrss-request-article): Don't use special html washing code.
| -rw-r--r-- | lisp/gnus/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/gnus/nnrss.el | 66 |
2 files changed, 24 insertions, 47 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 235fc71943d..7093ebbcefb 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-10-21 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * nnrss.el (nnrss-wash-html-in-text-plain-parts): Remove. | ||
| 4 | (nnrss-request-article): Don't use special html washing code. | ||
| 5 | |||
| 1 | 2010-10-20 Katsumi Yamaoka <yamaoka@jpl.org> | 6 | 2010-10-20 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 7 | ||
| 3 | * shr.el (shr-tag-table): Remove useless nconc. | 8 | * shr.el (shr-tag-table): Remove useless nconc. |
diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el index e3ce6db7c56..9a02c26073d 100644 --- a/lisp/gnus/nnrss.el +++ b/lisp/gnus/nnrss.el | |||
| @@ -114,11 +114,6 @@ The cdr of each element is used to decode data if it is available when | |||
| 114 | the car is what the data specify as the encoding. Or, the car is used | 114 | the car is what the data specify as the encoding. Or, the car is used |
| 115 | for decoding when the cdr that the data specify is not available.") | 115 | for decoding when the cdr that the data specify is not available.") |
| 116 | 116 | ||
| 117 | (defvar nnrss-wash-html-in-text-plain-parts nil | ||
| 118 | "*Non-nil means render text in text/plain parts as HTML. | ||
| 119 | The function specified by the `mm-text-html-renderer' variable will be | ||
| 120 | used to render text. If it is nil, text will simply be folded.") | ||
| 121 | |||
| 122 | (nnoo-define-basics nnrss) | 117 | (nnoo-define-basics nnrss) |
| 123 | 118 | ||
| 124 | ;;; Interface functions | 119 | ;;; Interface functions |
| @@ -197,8 +192,6 @@ used to render text. If it is nil, text will simply be folded.") | |||
| 197 | (deffoo nnrss-close-group (group &optional server) | 192 | (deffoo nnrss-close-group (group &optional server) |
| 198 | t) | 193 | t) |
| 199 | 194 | ||
| 200 | (defvar mm-text-html-renderer) | ||
| 201 | |||
| 202 | (deffoo nnrss-request-article (article &optional group server buffer) | 195 | (deffoo nnrss-request-article (article &optional group server buffer) |
| 203 | (setq group (nnrss-decode-group-name group)) | 196 | (setq group (nnrss-decode-group-name group)) |
| 204 | (when (stringp article) | 197 | (when (stringp article) |
| @@ -239,46 +232,25 @@ used to render text. If it is nil, text will simply be folded.") | |||
| 239 | (when text | 232 | (when text |
| 240 | (insert text) | 233 | (insert text) |
| 241 | (goto-char body) | 234 | (goto-char body) |
| 242 | (if (and nnrss-wash-html-in-text-plain-parts | 235 | (while (re-search-forward "\n+" nil t) |
| 243 | (progn | 236 | (replace-match " ")) |
| 244 | (require 'mm-view) | 237 | (goto-char body) |
| 245 | (setq fn (or (cdr (assq mm-text-html-renderer | 238 | ;; See `nnrss-check-group', which inserts "<br /><br />". |
| 246 | mm-text-html-washer-alist)) | 239 | (when (search-forward "<br /><br />" nil t) |
| 247 | mm-text-html-renderer)))) | 240 | (if (eobp) |
| 248 | (progn | 241 | (replace-match "\n") |
| 249 | (narrow-to-region body (point-max)) | 242 | (replace-match "\n\n"))) |
| 250 | (if (functionp fn) | 243 | (unless (eobp) |
| 251 | (funcall fn) | 244 | (let ((fill-column (default-value 'fill-column)) |
| 252 | (apply (car fn) (cdr fn))) | 245 | (window (get-buffer-window nntp-server-buffer))) |
| 253 | (widen) | 246 | (when window |
| 254 | (goto-char body) | 247 | (setq fill-column |
| 255 | (re-search-forward "[^\t\n ]" nil t) | 248 | (max 1 (/ (* (window-width window) 7) 8)))) |
| 256 | (beginning-of-line) | 249 | (fill-region (point) (point-max)) |
| 257 | (delete-region body (point)) | 250 | (goto-char (point-max)) |
| 258 | (goto-char (point-max)) | 251 | ;; XEmacs version of `fill-region' inserts newline. |
| 259 | (skip-chars-backward "\t\n ") | 252 | (unless (bolp) |
| 260 | (end-of-line) | 253 | (insert "\n")))) |
| 261 | (delete-region (point) (point-max)) | ||
| 262 | (insert "\n")) | ||
| 263 | (while (re-search-forward "\n+" nil t) | ||
| 264 | (replace-match " ")) | ||
| 265 | (goto-char body) | ||
| 266 | ;; See `nnrss-check-group', which inserts "<br /><br />". | ||
| 267 | (when (search-forward "<br /><br />" nil t) | ||
| 268 | (if (eobp) | ||
| 269 | (replace-match "\n") | ||
| 270 | (replace-match "\n\n"))) | ||
| 271 | (unless (eobp) | ||
| 272 | (let ((fill-column (default-value 'fill-column)) | ||
| 273 | (window (get-buffer-window nntp-server-buffer))) | ||
| 274 | (when window | ||
| 275 | (setq fill-column | ||
| 276 | (max 1 (/ (* (window-width window) 7) 8)))) | ||
| 277 | (fill-region (point) (point-max)) | ||
| 278 | (goto-char (point-max)) | ||
| 279 | ;; XEmacs version of `fill-region' inserts newline. | ||
| 280 | (unless (bolp) | ||
| 281 | (insert "\n"))))) | ||
| 282 | (when (or link enclosure) | 254 | (when (or link enclosure) |
| 283 | (insert "\n"))) | 255 | (insert "\n"))) |
| 284 | (when link | 256 | (when link |