From: yamaoka Date: Fri, 19 Jan 2001 05:50:45 +0000 (+0000) Subject: x-face-e21 users: X-Git-Tag: t-gnus-6_15_0-05-quimby~3 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=738f886be1ff6706efaec2d869952eeaa4b7f4c9;p=elisp%2Fgnus.git- x-face-e21 users: ================= Currently, the function `x-face-decode-message-header' does not work for the forwarded messages if you are using the latest T-gnus 6.15 or the latest Oort Gnus. I will fix the problem as soon as possible. Synch with Oort Gnus. --- diff --git a/contrib/ChangeLog b/contrib/ChangeLog index ff2e151..a394ef8 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,7 @@ +2001-01-18 Colin Marquardt + + * gpg.el (gpg-make-temp-file): Error info. + 2001-01-13 23:00:00 ShengHuo ZHU * gpg.el (gpg-build-arg-list): Use copy-sequence. diff --git a/contrib/gpg.el b/contrib/gpg.el index a223759..a5c48d5 100644 --- a/contrib/gpg.el +++ b/contrib/gpg.el @@ -630,7 +630,7 @@ adjust according to `gpg-command-passphrase-env'." ;; temporary file resides in a world-writable directory. (unless (or (memq system-type '(windows-nt cygwin32 win32 w32 mswindows)) (eq (file-modes gpg-temp-directory) 448)) ; mode 0700 - (error "Directory for temporary files must have mode 0700.")) + (error "Directory for temporary files (%s) must have mode 0700." gpg-temp-directory)) (setq name (make-temp-name name)) (let ((mode (default-file-modes))) (unwind-protect diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8f2c5ad..394182e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2001-01-18 23:00:00 ShengHuo ZHU + + * gnus-ems.el (gnus-article-display-xface): Add BUFFER. + * gnus-xmas.el (gnus-xmas-article-display-xface): Ditto. + + * gnus-art.el (article-display-x-face): Insert X-Face if there is + not. + 2001-01-18 19:00:00 ShengHuo ZHU * gnus-sum.el (gnus-summary-read-group-1): Don't test dead diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index eed09b6..104dbd1 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1720,27 +1720,48 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." (when (process-status "article-x-face") (delete-process "article-x-face")) (let ((inhibit-point-motion-hooks t) + x-faces (case-fold-search t) - (x-faces "") from last) - (when (gnus-buffer-live-p gnus-original-article-buffer) - (with-current-buffer gnus-original-article-buffer - (save-restriction - (article-narrow-to-head) - (while (re-search-forward "^X-Face:" nil t) - (setq x-faces - (concat - x-faces - (buffer-substring (match-beginning 0) - (1- (re-search-forward - "^\\($\\|[^ \t]\\)" nil t))))))))) (save-restriction (article-narrow-to-head) + (when (and buffer-read-only ;; When type `W f' + (progn + (goto-char (point-min)) + (not (re-search-forward "^X-Face:[\t ]*" nil t))) + (gnus-buffer-live-p gnus-original-article-buffer)) + (with-current-buffer gnus-original-article-buffer + (save-restriction + (article-narrow-to-head) + (while (re-search-forward "^X-Face:" nil t) + (setq x-faces + (concat + (or x-faces "") + (buffer-substring + (match-beginning 0) + (1- (re-search-forward + "^\\($\\|[^ \t]\\)" nil t)))))))) + (if x-faces + (let (point start bface eface buffer-read-only) + (goto-char (point-max)) + (forward-line -1) + (setq bface (get-text-property (gnus-point-at-bol) 'face) + eface (get-text-property (1- (gnus-point-at-eol)) 'face)) + (goto-char (point-max)) + (setq point (point)) + (insert x-faces) + (goto-char point) + (while (looking-at "\\([^:]+\\): *") + (put-text-property (match-beginning 1) (1+ (match-end 1)) + 'face bface) + (setq start (match-end 0)) + (forward-line 1) + (while (looking-at "[\t ]") + (forward-line 1)) + (put-text-property start (point) + 'face eface))))) + (goto-char (point-min)) (setq from (message-fetch-field "from")) - (when (gnus-buffer-live-p gnus-original-article-buffer) - (message-remove-header "X-Face") - (goto-char (point-min)) - (insert x-faces)) (goto-char (point-min)) (while (and gnus-article-x-face-command (not last) diff --git a/lisp/gnus-ems.el b/lisp/gnus-ems.el index fae3844..293b1e9 100644 --- a/lisp/gnus-ems.el +++ b/lisp/gnus-ems.el @@ -225,8 +225,8 @@ "Non-nil means the compface program supports the -X option. That produces XBM output.") -(defun gnus-article-display-xface (beg end) - "Display an XFace header from between BEG and END in the current article. +(defun gnus-article-display-xface (beg end &optional buffer) + "Display an XFace header from between BEG and END in BUFFER. Requires support for images in your Emacs and the external programs `uncompface', and `icontopbm'. On a GNU/Linux system these might be in packages with names like `compface' or `faces-xface' and @@ -244,7 +244,10 @@ for XEmacs." (make-ring gnus-article-xface-ring-size))) (save-excursion (let* ((cur (current-buffer)) - (data (buffer-substring beg end)) + (data (if buffer + (with-current-buffer buffer + (buffer-substring beg end)) + (buffer-substring beg end))) (image (cdr-safe (assoc data (ring-elements gnus-article-xface-ring-internal)))) default-enable-multibyte-characters) diff --git a/lisp/gnus-xmas.el b/lisp/gnus-xmas.el index c6d584f..47955fb 100644 --- a/lisp/gnus-xmas.el +++ b/lisp/gnus-xmas.el @@ -783,17 +783,20 @@ XEmacs compatibility workaround." "Face to show X face" :group 'gnus-xmas) -(defun gnus-xmas-article-display-xface (beg end) - "Display any XFace headers in the current article." +(defun gnus-xmas-article-display-xface (beg end &optional buffer) + "Display any XFace headers in BUFFER." (save-excursion (let ((xface-glyph (cond ((featurep 'xface) (make-glyph (vector 'xface :data (concat "X-Face: " - (buffer-substring beg end))))) + (if buffer + (with-current-buffer buffer + (buffer-substring beg end)) + (buffer-substring beg end)))))) ((featurep 'xpm) - (let ((cur (current-buffer))) + (let ((cur (or buffer (current-buffer)))) (save-excursion (gnus-set-work-buffer) (insert-buffer-substring cur beg end)