]> code.delx.au - gnu-emacs/commitdiff
(quoted-printable-encode-string): Use mm-enable-multibyte, or
authorGlenn Morris <rgm@gnu.org>
Fri, 4 Sep 2009 02:45:43 +0000 (02:45 +0000)
committerGlenn Morris <rgm@gnu.org>
Fri, 4 Sep 2009 02:45:43 +0000 (02:45 +0000)
mm-disable-multibyte, rather than default-enable-multibyte-characters.

lisp/gnus/qp.el

index d8d6d5d552eae70400daa4565c7192a072e1da34..aeec743ce55ecac1f83dbec0cd7a367bd472a6a4 100644 (file)
@@ -1,7 +1,7 @@
 ;;; qp.el --- Quoted-Printable functions
 
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+;;   2007, 2008, 2009  Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: mail, extensions
@@ -154,11 +154,13 @@ encode lines starting with \"From\"."
 
 (defun quoted-printable-encode-string (string)
   "Encode the STRING as quoted-printable and return the result."
-  (let ((default-enable-multibyte-characters (mm-multibyte-string-p string)))
-    (with-temp-buffer
-      (insert string)
-      (quoted-printable-encode-region (point-min) (point-max))
-      (buffer-string))))
+  (with-temp-buffer
+    (if (mm-multibyte-string-p string)
+       (mm-enable-multibyte)
+      (mm-disable-multibyte))
+    (insert string)
+    (quoted-printable-encode-region (point-min) (point-max))
+    (buffer-string)))
 
 (provide 'qp)