aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2005-07-02 02:53:20 +0000
committerMiles Bader2005-07-02 02:53:20 +0000
commit7d0c69befb28dfe1b2fe1745de7a7ba7dea905ef (patch)
tree08f745ebbb37d0c113fa675c5900fdcf3f694816
parentc2baa2b65bf9492c0a23a31816a561a187039ae9 (diff)
downloademacs-7d0c69befb28dfe1b2fe1745de7a7ba7dea905ef.tar.gz
emacs-7d0c69befb28dfe1b2fe1745de7a7ba7dea905ef.zip
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 87) - Update from CVS 2005-07-01 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/gnus-art.el (article-display-face): Improve the efficiency. (article-display-x-face): Ditto; remove grey x-face stuff.
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/gnus-art.el96
2 files changed, 51 insertions, 50 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index f11cff564c3..05eb4a0c1f0 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
12005-07-01 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * gnus-art.el (article-display-face): Improve the efficiency.
4 (article-display-x-face): Ditto; remove grey x-face stuff.
5
12005-06-30 Katsumi Yamaoka <yamaoka@jpl.org> 62005-06-30 Katsumi Yamaoka <yamaoka@jpl.org>
2 7
3 * gnus-art.el (article-display-face): Correct the position in 8 * gnus-art.el (article-display-face): Correct the position in
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index d8ca1877997..ba2c3ff9618 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -2123,28 +2123,26 @@ unfolded."
2123 ;; read-only. 2123 ;; read-only.
2124 (if (and wash-face-p (memq 'face gnus-article-wash-types)) 2124 (if (and wash-face-p (memq 'face gnus-article-wash-types))
2125 (gnus-delete-images 'face) 2125 (gnus-delete-images 'face)
2126 (let ((from (gnus-article-goto-header "from")) 2126 (let (face faces from)
2127 face faces) 2127 (save-current-buffer
2128 (save-excursion
2129 (when (and wash-face-p 2128 (when (and wash-face-p
2130 (progn 2129 (gnus-buffer-live-p gnus-original-article-buffer)
2131 (goto-char (point-min)) 2130 (not (re-search-forward "^Face:[\t ]*" nil t)))
2132 (not (re-search-forward "^Face:[\t ]*" nil t)))
2133 (gnus-buffer-live-p gnus-original-article-buffer))
2134 (set-buffer gnus-original-article-buffer)) 2131 (set-buffer gnus-original-article-buffer))
2135 (save-restriction 2132 (save-restriction
2136 (mail-narrow-to-head) 2133 (mail-narrow-to-head)
2137 (while (gnus-article-goto-header "Face") 2134 (while (gnus-article-goto-header "Face")
2138 (push (mail-header-field-value) faces)))) 2135 (push (mail-header-field-value) faces))))
2139 (when faces 2136 (when faces
2140 (unless from 2137 (goto-char (point-min))
2141 (insert "From:") 2138 (let ((from (gnus-article-goto-header "from"))
2142 (setq from (point)) 2139 png image)
2143 (insert "[no `from' set]\n")) 2140 (unless from
2144 (dolist (face faces) 2141 (insert "From:")
2145 (let ((png (gnus-convert-face-to-png face)) 2142 (setq from (point))
2146 image) 2143 (insert "[no `from' set]\n"))
2147 (when png 2144 (while faces
2145 (when (setq png (gnus-convert-face-to-png (pop faces)))
2148 (setq image (gnus-create-image png 'png t)) 2146 (setq image (gnus-create-image png 'png t))
2149 (goto-char from) 2147 (goto-char from)
2150 (gnus-add-wash-type 'face) 2148 (gnus-add-wash-type 'face)
@@ -2166,13 +2164,10 @@ unfolded."
2166 (gnus-delete-images 'xface) 2164 (gnus-delete-images 'xface)
2167 ;; Display X-Faces. 2165 ;; Display X-Faces.
2168 (let (x-faces from face) 2166 (let (x-faces from face)
2169 (save-excursion 2167 (save-current-buffer
2170 (when (and wash-face-p 2168 (when (and wash-face-p
2171 (progn 2169 (gnus-buffer-live-p gnus-original-article-buffer)
2172 (goto-char (point-min)) 2170 (not (re-search-forward "^X-Face:[\t ]*" nil t)))
2173 (not (re-search-forward
2174 "^X-Face\\(-[0-9]+\\)?:[\t ]*" nil t)))
2175 (gnus-buffer-live-p gnus-original-article-buffer))
2176 ;; If type `W f', use gnus-original-article-buffer, 2171 ;; If type `W f', use gnus-original-article-buffer,
2177 ;; otherwise use the current buffer because displaying 2172 ;; otherwise use the current buffer because displaying
2178 ;; RFC822 parts calls this function too. 2173 ;; RFC822 parts calls this function too.
@@ -2186,35 +2181,36 @@ unfolded."
2186 ;; single external face. 2181 ;; single external face.
2187 (when (stringp gnus-article-x-face-command) 2182 (when (stringp gnus-article-x-face-command)
2188 (setq x-faces (list (car x-faces)))) 2183 (setq x-faces (list (car x-faces))))
2189 (while (and (setq face (pop x-faces)) 2184 (when (and x-faces
2190 gnus-article-x-face-command 2185 gnus-article-x-face-command
2191 (or force 2186 (or force
2192 ;; Check whether this face is censored. 2187 ;; Check whether this face is censored.
2193 (not gnus-article-x-face-too-ugly) 2188 (not gnus-article-x-face-too-ugly)
2194 (and gnus-article-x-face-too-ugly from 2189 (and from
2195 (not (string-match gnus-article-x-face-too-ugly 2190 (not (string-match gnus-article-x-face-too-ugly
2196 from))))) 2191 from)))))
2197 ;; We display the face. 2192 (while (setq face (pop x-faces))
2198 (cond ((stringp gnus-article-x-face-command) 2193 ;; We display the face.
2199 ;; The command is a string, so we interpret the command 2194 (cond ((stringp gnus-article-x-face-command)
2200 ;; as a, well, command, and fork it off. 2195 ;; The command is a string, so we interpret the command
2201 (let ((process-connection-type nil)) 2196 ;; as a, well, command, and fork it off.
2202 (gnus-set-process-query-on-exit-flag 2197 (let ((process-connection-type nil))
2203 (start-process 2198 (gnus-set-process-query-on-exit-flag
2204 "article-x-face" nil shell-file-name 2199 (start-process
2205 shell-command-switch gnus-article-x-face-command) 2200 "article-x-face" nil shell-file-name
2206 nil) 2201 shell-command-switch gnus-article-x-face-command)
2207 (with-temp-buffer 2202 nil)
2208 (insert face) 2203 (with-temp-buffer
2209 (process-send-region "article-x-face" 2204 (insert face)
2210 (point-min) (point-max))) 2205 (process-send-region "article-x-face"
2211 (process-send-eof "article-x-face"))) 2206 (point-min) (point-max)))
2212 ((functionp gnus-article-x-face-command) 2207 (process-send-eof "article-x-face")))
2213 ;; The command is a lisp function, so we call it. 2208 ((functionp gnus-article-x-face-command)
2214 (funcall gnus-article-x-face-command face)) 2209 ;; The command is a lisp function, so we call it.
2215 (t 2210 (funcall gnus-article-x-face-command face))
2216 (error "%s is not a function" 2211 (t
2217 gnus-article-x-face-command))))))))) 2212 (error "%s is not a function"
2213 gnus-article-x-face-command))))))))))
2218 2214
2219(defun article-decode-mime-words () 2215(defun article-decode-mime-words ()
2220 "Decode all MIME-encoded words in the article." 2216 "Decode all MIME-encoded words in the article."