From 2309929a420de39a92c0db58ac9d110e762114a1 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 15 Apr 1999 10:39:00 +0000 Subject: [PATCH] * (mime-add-application/pgp-keys): Call `buffer-substring' in entity's buffer. ;; Contributed by Hirokazu FUKUI . --- ChangeLog | 5 +++++ mime-pgp.el | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8b829f6..26c4f1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-04-13 Hirokazu FUKUI + + * mime-pgp.el (mime-add-application/pgp-keys): Call + `buffer-substring' in entity's buffer. + 1999-04-15 Katsumi Yamaoka * mime-mc.el (mime-mc-insert-public-key, mime-mc-encrypt-region, diff --git a/mime-pgp.el b/mime-pgp.el index 1ec9487..f1327c8 100644 --- a/mime-pgp.el +++ b/mime-pgp.el @@ -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) -- 1.7.10.4