changeset 23521:616acf65d243

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