]> git.eshelyaron.com Git - emacs.git/commitdiff
(viqr-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/viet-util.el

index 0520a836ed2af4f15dc48424a60ee11854d49d7d..f90dc494df71880504eef2f4d6534a1dc25055af 100644 (file)
@@ -283,14 +283,12 @@ positions (integers or markers) specifying the stretch of the region."
 
 ;;;###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))