From: Kenichi Handa Date: Wed, 21 Oct 1998 11:50:56 +0000 (+0000) Subject: (thai-pre-write-conversion): Use with-temp-buffer. X-Git-Tag: emacs-20.4~1426 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=166488a59ac921edfeef1efd24824f55b7f0c210;p=emacs.git (thai-pre-write-conversion): Use with-temp-buffer. --- diff --git a/lisp/language/thai-util.el b/lisp/language/thai-util.el index 3d4863313ec..1bb9beb3c2b 100644 --- a/lisp/language/thai-util.el +++ b/lisp/language/thai-util.el @@ -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))