From: morioka Date: Fri, 12 Jun 1998 03:35:53 +0000 (+0000) Subject: (mime-save-background-color): New macro. X-Git-Tag: remi-1_6_0~3 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=39219de588175ce2aeda07b4bb51e3741af8a3c0;p=elisp%2Fsemi.git (mime-save-background-color): New macro. (mime-preview-text/html): Use `mime-save-background-color'. --- diff --git a/mime-w3.el b/mime-w3.el index b5b0e41..f17ac45 100644 --- a/mime-w3.el +++ b/mime-w3.el @@ -35,15 +35,26 @@ ,keymap) ) +(defmacro mime-save-background-color (&rest body) + (if (featurep 'xemacs) + `(let ((color (color-name (face-background 'default)))) + (prog1 + (progn ,@body) + (font-set-face-background 'default color + (get-buffer gnus-article-buffer)) + )) + (cons 'progn body))) + (defun mime-preview-text/html (entity situation) - (save-restriction - (narrow-to-region (point-max)(point-max)) - (mime-text-insert-decoded-body entity) - (let ((beg (point-min))) - (remove-text-properties beg (point-max) '(face nil)) - (w3-region beg (point-max)) - (mime-put-keymap-region beg (point-max) w3-mode-map) - ))) + (mime-save-background-color + (save-restriction + (narrow-to-region (point-max)(point-max)) + (mime-text-insert-decoded-body entity) + (let ((beg (point-min))) + (remove-text-properties beg (point-max) '(face nil)) + (w3-region beg (point-max)) + (mime-put-keymap-region beg (point-max) w3-mode-map) + )))) ;;; @ end