diff options
| author | Kenichi Handa | 1998-10-21 11:50:56 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-10-21 11:50:56 +0000 |
| commit | 166488a59ac921edfeef1efd24824f55b7f0c210 (patch) | |
| tree | 2221db7f96987bea6362ca1c670f5155479cb5ea | |
| parent | 7273226df7251183b42ba6a8a270f9de65a84c3e (diff) | |
| download | emacs-166488a59ac921edfeef1efd24824f55b7f0c210.tar.gz emacs-166488a59ac921edfeef1efd24824f55b7f0c210.zip | |
(thai-pre-write-conversion): Use with-temp-buffer.
| -rw-r--r-- | lisp/language/thai-util.el | 14 |
1 files changed, 6 insertions, 8 deletions
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." | |||
| 166 | 166 | ||
| 167 | ;;;###autoload | 167 | ;;;###autoload |
| 168 | (defun thai-pre-write-conversion (from to) | 168 | (defun thai-pre-write-conversion (from to) |
| 169 | (let ((old-buf (current-buffer)) | 169 | (let ((old-buf (current-buffer))) |
| 170 | (work-buf (get-buffer-create " *thai-work*"))) | 170 | (with-temp-buffer |
| 171 | (set-buffer work-buf) | 171 | (if (stringp from) |
| 172 | (erase-buffer) | 172 | (insert from) |
| 173 | (if (stringp from) | 173 | (insert-buffer-substring old-buf from to)) |
| 174 | (insert from) | 174 | (decompose-region (point-min) (point-max))) |
| 175 | (insert-buffer-substring old-buf from to)) | ||
| 176 | (decompose-region (point-min) (point-max)) | ||
| 177 | ;; Should return nil as annotations. | 175 | ;; Should return nil as annotations. |
| 178 | nil)) | 176 | nil)) |
| 179 | 177 | ||