Mercurial > emacs
changeset 104834:36201c0e0c98
(quoted-printable-encode-string): Use mm-enable-multibyte, or
mm-disable-multibyte, rather than default-enable-multibyte-characters.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Fri, 04 Sep 2009 02:45:43 +0000 |
parents | 2d2110ae11b5 |
children | 88f046f0db6f |
files | lisp/gnus/qp.el |
diffstat | 1 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/qp.el Thu Sep 03 15:21:47 2009 +0000 +++ b/lisp/gnus/qp.el Fri Sep 04 02:45:43 2009 +0000 @@ -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 @@ (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)