* mm-uu.el (mm-uu-pgp-signed-extract-1): Set
authorJesper Harder <harder@ifa.au.dk>
Sun, 6 Apr 2003 01:23:53 +0000 (01:23 +0000)
committerJesper Harder <harder@ifa.au.dk>
Sun, 6 Apr 2003 01:23:53 +0000 (01:23 +0000)
buffer-file-coding-system.

* mm-bodies.el (mm-decode-body): Set buffer-file-coding-system to
last-coding-system-used.

* mml2015.el (mml2015-pgg-clear-verify): Encode the text
according to buffer-file-coding-system.

lisp/ChangeLog
lisp/mm-bodies.el
lisp/mm-uu.el
lisp/mml2015.el

index 2d550f8..0393170 100644 (file)
@@ -1,5 +1,14 @@
 2003-04-06  Jesper Harder  <harder@ifa.au.dk>
 
+       * mm-uu.el (mm-uu-pgp-signed-extract-1): Set
+       buffer-file-coding-system.
+
+       * mm-bodies.el (mm-decode-body): Set buffer-file-coding-system to
+       last-coding-system-used.
+
+       * mml2015.el (mml2015-pgg-clear-verify): Encode the text
+       according to buffer-file-coding-system.
+
        * pgg-gpg.el (pgg-gpg-process-region): Revert previous change.
 
        * pgg-pgp.el (pgg-pgp-process-region, pgg-pgp-verify-region)
index e4c7894..ebadc4d 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mm-bodies.el --- Functions for decoding MIME things
 
-;; Copyright (C) 1998, 1999, 2000, 2001
+;; Copyright (C) 1998, 1999, 2000, 2001, 2003
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -276,7 +276,8 @@ use the supplied charset unconditionally."
              (mm-decode-coding-region (point-min) (point-max)
                                              coding-system)
            (mm-decode-coding-region-safely (point-min) (point-max)
-                                           coding-system)))))))
+                                           coding-system))))
+      (setq buffer-file-coding-system last-coding-system-used))))
 
 (defun mm-decode-coding-region-safely (start end coding-system)
   "Decode region between START and END with CODING-SYSTEM.
index cd20115..96c9f57 100644 (file)
@@ -1,5 +1,5 @@
 ;;; mm-uu.el --- Return uu stuff as mm handles
-;; Copyright (c) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+;; Copyright (c) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
 ;; Keywords: postscript uudecode binhex shar forward gnatsweb pgp
@@ -316,8 +316,10 @@ Return that buffer."
   (defvar gnus-newsgroup-charset))
 
 (defun mm-uu-pgp-signed-extract-1 (handles ctl)
-  (let ((buf (mm-uu-copy-to-buffer (point-min) (point-max))))
+  (let ((buf (mm-uu-copy-to-buffer (point-min) (point-max)))
+       (coding-system buffer-file-coding-system))
     (with-current-buffer buf
+      (setq buffer-file-coding-system coding-system)
       (if (mm-uu-pgp-signed-test)
          (progn
            (mml2015-clean-buffer)
index e61ce7d..6f9880f 100644 (file)
@@ -1,5 +1,5 @@
 ;;; mml2015.el --- MIME Security with Pretty Good Privacy (PGP)
-;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
 ;; Keywords: PGP MIME MML
 
 (defun mml2015-pgg-clear-verify ()
   (let ((pgg-errors-buffer mml2015-result-buffer)
-       (text (current-buffer)))
+       (text (buffer-string))
+       (coding-system buffer-file-coding-system))
     (if (condition-case err
            (prog1
                (mm-with-unibyte-buffer
-                 (insert-buffer text)
+                 (insert (encode-coding-string text coding-system))
                  (pgg-verify-region (point-min) (point-max) nil t))
              (goto-char (point-min))
              (while (search-forward "\r\n" nil t)