diff options
author | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2010-09-02 01:24:21 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2010-09-02 01:24:21 +0000 |
commit | 846daf20c2e4e2c44dcc4c755d032c3aa1f1ccbd (patch) | |
tree | f9eed055a7a4237c3082654a45c69c78fb003777 /lisp/gnus/nndoc.el | |
parent | 2aafbe5a81ae9e35c9884966d98de75da92fdf35 (diff) | |
download | emacs-846daf20c2e4e2c44dcc4c755d032c3aa1f1ccbd.tar.gz |
gnus-html.el (gnus-html-rescale-image): The rescaling logic scaled down too much; nndoc.el (nndoc-type-alist): Added a new type for Google digests.
Diffstat (limited to 'lisp/gnus/nndoc.el')
-rw-r--r-- | lisp/gnus/nndoc.el | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/lisp/gnus/nndoc.el b/lisp/gnus/nndoc.el index 8b10906ce4c..6acae6dcdd5 100644 --- a/lisp/gnus/nndoc.el +++ b/lisp/gnus/nndoc.el @@ -118,6 +118,16 @@ from the document.") (file-end . "^End of") (prepare-body-function . nndoc-unquote-dashes) (subtype digest guess)) + (google + (pre-dissection-function . nndoc-decode-content-transfer-encoding) + (article-begin . "^== [0-9]+ of [0-9]+ ==$") + (head-begin . "^Date:") + (head-end . "^$") + (body-end-function . nndoc-digest-body-end) + (body-begin . "^$") + (file-end . "^==============================================================================$") + (prepare-body-function . nndoc-unquote-dashes) + (subtype digest guess)) (lanl-gov-announce (article-begin . "^\\\\\\\\\n") (head-begin . "^\\(Paper.*:\\|arXiv:\\)") @@ -186,6 +196,7 @@ from the document.") (defvoo nndoc-article-begin-function nil) (defvoo nndoc-generate-article-function nil) (defvoo nndoc-dissection-function nil) +(defvoo nndoc-pre-dissection-function nil) (defvoo nndoc-status-string "") (defvoo nndoc-group-alist nil) @@ -363,7 +374,8 @@ from the document.") nndoc-generate-head-function nndoc-body-begin-function nndoc-head-begin-function nndoc-generate-article-function - nndoc-dissection-function))) + nndoc-dissection-function + nndoc-pre-dissection-function))) (while vars (set (pop vars) nil))) (let (defs) @@ -445,6 +457,22 @@ from the document.") (forward-line 1) (goto-char (+ (point) (string-to-number (match-string 1)))))) +(defun nndoc-google-type-p () + (when (re-search-forward "^=3D=3D 1 of [0-9]+ =3D=3D$" nil t) + t)) + +(defun nndoc-decode-content-transfer-encoding () + (let ((encoding + (save-restriction + (message-narrow-to-head) + (message-fetch-field "content-transfer-encoding")))) + (when (and encoding + (search-forward "\n\n" nil t)) + (save-restriction + (narrow-to-region (point) (point-max)) + (mm-decode-content-transfer-encoding + (intern (downcase (mail-header-strip encoding)))))))) + (defun nndoc-babyl-type-p () (when (re-search-forward "\^_\^L *\n" nil t) t)) @@ -807,6 +835,9 @@ from the document.") ;; Remove blank lines. (while (eq (following-char) ?\n) (delete-char 1)) + (when nndoc-pre-dissection-function + (save-excursion + (funcall nndoc-pre-dissection-function))) (if nndoc-dissection-function (funcall nndoc-dissection-function) ;; Find the beginning of the file. |