From: yamaoka Date: Thu, 15 Apr 1999 10:39:00 +0000 (+0000) Subject: * (mime-add-application/pgp-keys): Call `buffer-substring' in entity's buffer. X-Git-Tag: semi-pgpgpg_11 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2309929a420de39a92c0db58ac9d110e762114a1;p=elisp%2Fsemi.git * (mime-add-application/pgp-keys): Call `buffer-substring' in entity's buffer. ;; Contributed by Hirokazu FUKUI . --- 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)