emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp/gnus utf7.el


From: Glenn Morris
Subject: [Emacs-diffs] emacs/lisp/gnus utf7.el
Date: Fri, 04 Sep 2009 02:46:08 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       09/09/04 02:46:08

Modified files:
        lisp/gnus      : utf7.el 

Log message:
        (utf7-encode, utf7-decode): Use mm-with-multibyte-buffer, or
        mm-with-unibyte-buffer, rather than default-enable-multibyte-characters.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/gnus/utf7.el?cvsroot=emacs&r1=1.17&r2=1.18

Patches:
Index: utf7.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/gnus/utf7.el,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- utf7.el     5 Jan 2009 03:22:19 -0000       1.17
+++ utf7.el     4 Sep 2009 02:46:08 -0000       1.18
@@ -1,7 +1,7 @@
 ;;; utf7.el --- UTF-7 encoding/decoding for Emacs   -*-coding: iso-8859-1;-*-
 
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008, 2009  Free Software Foundation, Inc.
 
 ;; Author: Jon K Hellan <address@hidden>
 ;; Maintainer: address@hidden
@@ -210,23 +210,21 @@
   (if (and (coding-system-p 'utf-7) (coding-system-p 'utf-7-imap))
       ;; Emacs 23 with proper support for IMAP
       (encode-coding-string string (if for-imap 'utf-7-imap 'utf-7))
-    (let ((default-enable-multibyte-characters t))
-      (with-temp-buffer
+    (mm-with-multibyte-buffer
        (insert string)
        (utf7-encode-internal for-imap)
-       (buffer-string)))))
+     (buffer-string))))
 
 (defun utf7-decode (string &optional for-imap)
   "Decode UTF-7 STRING.  Use IMAP modification if FOR-IMAP is non-nil."
   (if (and (coding-system-p 'utf-7) (coding-system-p 'utf-7-imap))
       ;; Emacs 23 with proper support for IMAP
       (decode-coding-string string (if for-imap 'utf-7-imap 'utf-7))
-    (let ((default-enable-multibyte-characters nil))
-      (with-temp-buffer
+    (mm-with-unibyte-buffer
        (insert string)
        (utf7-decode-internal for-imap)
        (mm-enable-multibyte)
-       (buffer-string)))))
+     (buffer-string))))
 
 (provide 'utf7)
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]