From: yamaoka Date: Mon, 18 Feb 2002 04:23:26 +0000 (+0000) Subject: Synch with Oort Gnus (includes Teranishi-san's change). X-Git-Tag: t-gnus-6_15_6-01-quimby~52 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=0e0ff8d2a22f295cf874a83e1a0264eba8536d32;p=elisp%2Fgnus.git- Synch with Oort Gnus (includes Teranishi-san's change). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 976fae3..ce9bebd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,8 +1,15 @@ +2002-02-18 Katsumi Yamaoka + + * gnus-fun.el (gnus-convert-gray-x-face-to-xpm): Improved to speed + up. Suggested by Yuuichi Teranishi . + + * gnus-art.el (article-display-x-face): Sort gray X-Faces. + 2002-02-17 ShengHuo ZHU Some ideas is inspired by code from Hrvoje Niksic - + * gnus-art.el (gnus-article-wash-function): Set the default to nil, so that we use mm-text-html-renderer instead. (article-wash-html): Use mm-text-html-renderer. @@ -11,7 +18,7 @@ (mm-text-html-renderer): New variable. (mm-inline-text-html-renderer): Set the default to nil, so that we use mm-text-html-renderer instead. - + * mm-view.el (mm-inline-text-html): New function. (mm-text-html-renderer-alist): New variable. (mm-inline-text-vcard): New function. @@ -25,7 +32,7 @@ (mm-inline-wash-with-stdin): New function. 2002-02-17 ShengHuo ZHU - + * message-utils.el: Fix installation doc. From: Reiner Steib <4uce.02.r.steib@gmx.net> diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index bd3d950..fe540b5 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -2055,13 +2055,22 @@ unfolded." (set-buffer gnus-original-article-buffer)) (save-restriction (mail-narrow-to-head) - (let ((regexp - (if gnus-treat-display-grey-xface - "x-face\\(-[0-9]+\\)?" - "x-face"))) - (while (gnus-article-goto-header regexp) - (when (match-beginning 2) - (setq grey t)) + (if gnus-treat-display-grey-xface + (progn + (while (gnus-article-goto-header "X-Face\\(-[0-9]+\\)?") + (if (match-beginning 2) + (progn + (setq grey t) + (push (cons (string-to-number (match-string 2)) + (mail-header-field-value)) + x-faces)) + (push (cons 0 (mail-header-field-value)) x-faces))) + (dolist (x-face (prog1 + (nreverse (sort x-faces + 'car-less-than-car)) + (setq x-faces nil))) + (push (cdr x-face) x-faces))) + (while (gnus-article-goto-header "X-Face") (push (mail-header-field-value) x-faces))) (setq from (message-fetch-field "from")))) (if grey diff --git a/lisp/gnus-fun.el b/lisp/gnus-fun.el index 7d5f5ee..033e2e0 100644 --- a/lisp/gnus-fun.el +++ b/lisp/gnus-fun.el @@ -119,35 +119,37 @@ Output to the current buffer, replace text, and don't mingle error." (let* ((depth (length faces)) (scale (/ 255 (1- (expt 2 depth)))) (ok-p t) - bit-list bit-lists pixels pixel) - (dolist (face faces) - (setq bit-list nil) - (with-temp-buffer + (coding-system-for-read 'binary) + (coding-system-for-write 'binary) + default-enable-multibyte-characters + start bit-array bit-arrays pixels pixel) + (with-temp-buffer + (dolist (face faces) + (erase-buffer) (insert (uncompface face)) (gnus-shell-command-on-region (point-min) (point-max) "pnmnoraw") (goto-char (point-min)) (forward-line 2) + (setq start (point)) + (insert "[") (while (not (eobp)) - (cond - ((eq (following-char) ?0) - (push 0 bit-list)) - ((eq (following-char) ?1) - (push 1 bit-list))) - (forward-char 1))) - (unless (= (length bit-list) (* 48 48)) - (setq ok-p nil)) - (push bit-list bit-lists)) - (when ok-p - (dotimes (i (* 48 48)) - (setq pixel 0) - (dotimes (plane depth) - (setq pixel (+ (* pixel 2) (nth i (nth plane bit-lists))))) - (push pixel pixels)) - (with-temp-buffer + (forward-char 1) + (insert " ")) + (insert "]") + (goto-char start) + (setq bit-array (read (current-buffer))) + (unless (= (length bit-array) (* 48 48)) + (setq ok-p nil)) + (push bit-array bit-arrays)) + (when ok-p + (erase-buffer) (insert "P2\n48 48\n255\n") - (dolist (pixel pixels) + (dotimes (i (* 48 48)) + (setq pixel 0) + (dotimes (plane depth) + (setq pixel (+ (* pixel 2) (aref (nth plane bit-arrays) i)))) (insert (number-to-string (* scale pixel)) " ")) (gnus-shell-command-on-region (point-min) (point-max)