From: morioka Date: Mon, 8 Jun 1998 15:27:55 +0000 (+0000) Subject: (mime-put-keymap-region): New macro. X-Git-Tag: semi-1_5_4~6 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=050d2808f8f2082b60a935c83d42b343432974b6;p=elisp%2Fsemi.git (mime-put-keymap-region): New macro. (mime-preview-text/html): Use macro `mime-put-keymap-region'. --- diff --git a/mime-w3.el b/mime-w3.el index 7d0e3d8..b5b0e41 100644 --- a/mime-w3.el +++ b/mime-w3.el @@ -27,6 +27,14 @@ (require 'w3) (require 'mime-text) +(defmacro mime-put-keymap-region (start end keymap) + `(put-text-property ,start ,end + ',(if (featurep 'xemacs) + 'keymap + 'local-map) + ,keymap) + ) + (defun mime-preview-text/html (entity situation) (save-restriction (narrow-to-region (point-max)(point-max)) @@ -34,6 +42,7 @@ (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) )))