(wl-message-decrypt-pgp-nonmime): Keep text
authorhmurata <hmurata>
Sun, 4 Jun 2006 02:33:07 +0000 (02:33 +0000)
committerhmurata <hmurata>
Sun, 4 Jun 2006 02:33:07 +0000 (02:33 +0000)
properties at the decrypting region.

wl/ChangeLog
wl/wl-mime.el

index 66c19eb..84207a8 100644 (file)
@@ -1,3 +1,8 @@
+2006-06-04  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-mime.el (wl-message-decrypt-pgp-nonmime): Keep text
+       properties at the decrypting region.
+
 2006-06-03  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
        * wl-util.el (wl-find-region): New function.
index c708559..999dfec 100644 (file)
@@ -559,12 +559,14 @@ It calls following-method selected from variable
       (unless region
        (error "Cannot find pgp encrypted region"))
       (save-restriction
-       (narrow-to-region (car region) (cdr region))
-       (when (setq coding-system
-                   (wl-mime-pgp-decrypt-region (point-min) (point-max)))
-         (put-text-property (point-min) (point-max)
-                            'wl-mime-decoded-coding-system
-                            coding-system))))))
+       (let ((props (text-properties-at (car region))))
+         (narrow-to-region (car region) (cdr region))
+         (when (setq coding-system
+                     (wl-mime-pgp-decrypt-region (point-min) (point-max)))
+           (setq props (plist-put props
+                                  'wl-mime-decoded-coding-system
+                                  coding-system)))
+         (set-text-properties (point-min) (point-max) props))))))
 
 (defun wl-message-verify-pgp-nonmime (&optional arg)
   "Verify PGP signed region.