X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-html.el;h=b706de7430ec214c0a5d70b09457fda61901f5c5;hb=c14337e1a2a4def64360a74f2669160805f49323;hp=770904fa1c4cf2bd31b716b470076587b9bf8c32;hpb=283e76bd2d5af17da11a4f5da4443962eab7ae53;p=gnus diff --git a/lisp/gnus-html.el b/lisp/gnus-html.el index 770904fa1..b706de743 100644 --- a/lisp/gnus-html.el +++ b/lisp/gnus-html.el @@ -1,6 +1,6 @@ ;;; gnus-html.el --- Render HTML in a buffer. -;; Copyright (C) 2010-2012 Free Software Foundation, Inc. +;; Copyright (C) 2010-2015 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: html, web @@ -45,7 +45,10 @@ "Time used to determine if we should use images from the cache." :version "24.1" :group 'gnus-art - :type 'integer) + ;; FIXME hardly the friendliest type. The allowed value is actually + ;; any time value, but we are assuming no-one cares about USEC and + ;; PSEC here. It would be better to eg make it a number of minutes. + :type '(list integer integer)) (defcustom gnus-html-image-automatic-caching t "Whether automatically cache retrieve images." @@ -136,7 +139,8 @@ CHARS is a regexp-like character alternative (e.g., \"[)$]\")." (charset (mail-content-type-get (mm-handle-type handle) 'charset))) (when (and charset - (setq charset (mm-charset-to-coding-system charset)) + (setq charset (mm-charset-to-coding-system + charset nil t)) (not (eq charset 'ascii))) (insert (prog1 (mm-decode-coding-string (buffer-string) charset) @@ -435,6 +439,9 @@ Return a string with image data." (truncate (* gnus-max-image-proportion (- (nth 3 edges) (nth 1 edges))))))) +;; Behind display-graphic-p test. +(declare-function image-size "image.c" (spec &optional pixels frame)) + (defun gnus-html-put-image (data url &optional alt-text) "Put an image with DATA from URL and optional ALT-TEXT." (when (gnus-graphic-display-p)