]> git.eshelyaron.com Git - emacs.git/commitdiff
(pre-write-encode-hz): Use with-temp-buffer.
authorKenichi Handa <handa@m17n.org>
Wed, 21 Oct 1998 11:50:56 +0000 (11:50 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 21 Oct 1998 11:50:56 +0000 (11:50 +0000)
lisp/language/chinese.el

index 851e4faa9038b3097bb580f14d014374ac605d04..bf50795a6914b4bf17a2cc54fe1a89d94a3788f3 100644 (file)
       (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