* (mime-add-application/pgp-keys): Call `buffer-substring' in entity's buffer. semi-pgpgpg_11
authoryamaoka <yamaoka>
Thu, 15 Apr 1999 10:39:00 +0000 (10:39 +0000)
committeryamaoka <yamaoka>
Thu, 15 Apr 1999 10:39:00 +0000 (10:39 +0000)
;; Contributed by Hirokazu FUKUI <fukui@atesoft.advantest.co.jp>.

ChangeLog
mime-pgp.el

index 8b829f6..26c4f1b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1999-04-13  Hirokazu FUKUI    <fukui@atesoft.advantest.co.jp>
+
+       * mime-pgp.el (mime-add-application/pgp-keys): Call
+       `buffer-substring' in entity's buffer.
+
 1999-04-15  Katsumi Yamaoka   <yamaoka@jpl.org>
 
        * mime-mc.el (mime-mc-insert-public-key, mime-mc-encrypt-region,
index 1ec9487..f1327c8 100644 (file)
@@ -492,11 +492,15 @@ key-ID if it is found."
 (defun mime-add-application/pgp-keys (entity situation)
   (let* ((start (mime-entity-point-min entity))
         (end (mime-entity-point-max entity))
-        (entity-number (mime-raw-point-to-entity-number start))
-        (new-name (format "%s-%s" (buffer-name) entity-number))
+        (entity-number (mime-raw-point-to-entity-number start entity))
+        (new-name (format "%s-%s"
+                          (buffer-name (mime-entity-buffer entity))
+                          entity-number))
         (encoding (cdr (assq 'encoding situation)))
         str)
-    (setq str (buffer-substring start end))
+    (setq str (save-excursion
+               (set-buffer (mime-entity-buffer entity))
+               (buffer-substring start end)))
     (switch-to-buffer new-name)
     (setq buffer-read-only nil)
     (erase-buffer)