changeset 23524:05c942de9202

(pre-write-encode-hz): Use with-temp-buffer.
author Kenichi Handa <handa@m17n.org>
date Wed, 21 Oct 1998 11:50:56 +0000
parents e49c2fb2a695
children 7462da3c79cb
files lisp/language/chinese.el
diffstat 1 files changed, 7 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/language/chinese.el	Wed Oct 21 11:50:56 1998 +0000
+++ b/lisp/language/chinese.el	Wed Oct 21 11:50:56 1998 +0000
@@ -100,15 +100,13 @@
       (set-buffer-modified-p buffer-modified-p))))
 
 (defun pre-write-encode-hz (from to)
-  (let ((buf (current-buffer))
-	(work (get-buffer-create " *pre-write-encoding-work*")))
-    (set-buffer work)
-    (erase-buffer)
-    (if (stringp from)
-	(insert from)
-      (insert-buffer-substring buf from to))
-    (let (last-coding-system-used)
-      (encode-hz-region 1 (point-max)))
+  (let ((buf (current-buffer)))
+    (with-temp-buffer
+      (if (stringp from)
+	  (insert from)
+	(insert-buffer-substring buf from to))
+      (let (last-coding-system-used)
+	(encode-hz-region 1 (point-max))))
     nil))
 
 (set-language-info-alist