[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r101285: gnus-html.el (gnus-html-resc
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r101285: 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. |
Date: |
Thu, 02 Sep 2010 01:24:21 +0000 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 101285
author: Lars Magne Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Thu 2010-09-02 01:24:21 +0000
message:
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.
modified:
lisp/gnus/ChangeLog
lisp/gnus/gnus-html.el
lisp/gnus/nndoc.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2010-09-02 01:18:45 +0000
+++ b/lisp/gnus/ChangeLog 2010-09-02 01:24:21 +0000
@@ -6,6 +6,8 @@
2010-09-01 Lars Magne Ingebrigtsen <address@hidden>
+ * nndoc.el (nndoc-type-alist): Added a new type for Google digests.
+
* gnus-html.el (gnus-html-wash-tags): Check the value of
gnus-blocked-images in the summary buffer.
=== modified file 'lisp/gnus/gnus-html.el'
--- a/lisp/gnus/gnus-html.el 2010-09-02 01:18:45 +0000
+++ b/lisp/gnus/gnus-html.el 2010-09-02 01:24:21 +0000
@@ -260,9 +260,6 @@
(window-height (truncate (* gnus-max-image-proportion
(- (nth 3 edges) (nth 1 edges)))))
scaled-image)
- (when (> width window-width)
- (setq window-height (truncate (* window-height
- (/ (* 1.0 window-width) width)))))
(or
(cond ((> height window-height)
(create-image file 'imagemagick nil
=== modified file 'lisp/gnus/nndoc.el'
--- a/lisp/gnus/nndoc.el 2010-09-02 00:55:51 +0000
+++ b/lisp/gnus/nndoc.el 2010-09-02 01:24:21 +0000
@@ -118,6 +118,16 @@
(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 @@
(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 @@
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 @@
(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 @@
;; 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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r101285: 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.,
Katsumi Yamaoka <=