changeset 23523:e49c2fb2a695

(thai-pre-write-conversion): Use with-temp-buffer.
author Kenichi Handa <handa@m17n.org>
date Wed, 21 Oct 1998 11:50:56 +0000
parents 0f86fe9632e0
children 05c942de9202
files lisp/language/thai-util.el
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/language/thai-util.el	Wed Oct 21 11:50:56 1998 +0000
+++ b/lisp/language/thai-util.el	Wed Oct 21 11:50:56 1998 +0000
@@ -166,14 +166,12 @@
 
 ;;;###autoload
 (defun thai-pre-write-conversion (from to)
-  (let ((old-buf (current-buffer))
-	(work-buf (get-buffer-create " *thai-work*")))
-    (set-buffer work-buf)
-    (erase-buffer)
-    (if (stringp from)
-	(insert from)
-      (insert-buffer-substring old-buf from to))
-    (decompose-region (point-min) (point-max))
+  (let ((old-buf (current-buffer)))
+    (with-temp-buffer
+      (if (stringp from)
+	  (insert from)
+	(insert-buffer-substring old-buf from to))
+      (decompose-region (point-min) (point-max)))
     ;; Should return nil as annotations.
     nil))