;;;###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))