]> git.eshelyaron.com Git - emacs.git/commitdiff
(thai-pre-write-conversion): 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/thai-util.el

index 3d4863313ec61edc260fff08d7c32a50dd190d78..1bb9beb3c2b49e2e8537c4890369155940734fae 100644 (file)
@@ -166,14 +166,12 @@ positions (integers or markers) specifying the region."
 
 ;;;###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))