(mime-put-keymap-region): New macro.
authormorioka <morioka>
Mon, 8 Jun 1998 15:27:55 +0000 (15:27 +0000)
committermorioka <morioka>
Mon, 8 Jun 1998 15:27:55 +0000 (15:27 +0000)
(mime-preview-text/html): Use macro `mime-put-keymap-region'.

mime-w3.el

index 7d0e3d8..b5b0e41 100644 (file)
 (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)
       )))