+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.
;; 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
+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
(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)
"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
(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)
"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)