From: morioka Date: Sun, 9 Aug 1998 18:08:06 +0000 (+0000) Subject: (mime-preview-text/html): Insert dummy "\n" into end of entity to X-Git-Tag: semi-1_8_5~13 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f411d6c5e65874eb30fbeb0c64483df8cccfdfee;p=elisp%2Fsemi.git (mime-preview-text/html): Insert dummy "\n" into end of entity to avoid keymap text-property problem. --- diff --git a/mime-w3.el b/mime-w3.el index 2c0655b..fec612c 100644 --- a/mime-w3.el +++ b/mime-w3.el @@ -32,8 +32,7 @@ ',(if (featurep 'xemacs) 'keymap 'local-map) - ,keymap) - ) + ,keymap)) (defmacro mime-save-background-color (&rest body) (if (featurep 'xemacs) @@ -45,14 +44,16 @@ (cons 'progn body))) (defun mime-preview-text/html (entity situation) - (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) + (goto-char (point-max)) + (let ((p (point))) + (insert "\n") + (goto-char p) + (mime-save-background-color + (save-restriction + (narrow-to-region p p) + (mime-text-insert-decoded-body entity) + (w3-region p (point-max)) + (mime-put-keymap-region p (point-max) w3-mode-map) ))))