x-face-e21 users:
authoryamaoka <yamaoka>
Fri, 19 Jan 2001 05:50:45 +0000 (05:50 +0000)
committeryamaoka <yamaoka>
Fri, 19 Jan 2001 05:50:45 +0000 (05:50 +0000)
=================
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.

contrib/ChangeLog
contrib/gpg.el
lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-ems.el
lisp/gnus-xmas.el

index ff2e151..a394ef8 100644 (file)
@@ -1,3 +1,7 @@
+2001-01-18  Colin Marquardt <colin.marquardt@usa.alcatel.com>
+
+       * gpg.el (gpg-make-temp-file): Error info.
+
 2001-01-13 23:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gpg.el (gpg-build-arg-list): Use copy-sequence.
index a223759..a5c48d5 100644 (file)
@@ -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
index 8f2c5ad..394182e 100644 (file)
@@ -1,3 +1,11 @@
+2001-01-18 23:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * 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  <zsh@cs.rochester.edu>
 
        * gnus-sum.el (gnus-summary-read-group-1): Don't test dead
index eed09b6..104dbd1 100644 (file)
@@ -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)
index fae3844..293b1e9 100644 (file)
   "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)
index c6d584f..47955fb 100644 (file)
@@ -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)