Commit 7273226d authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(tibetan-pre-write-conversion): Use with-temp-buffer.

parent ada51178
...@@ -446,15 +446,13 @@ See also docstring of the function tibetan-compose-region." ...@@ -446,15 +446,13 @@ See also docstring of the function tibetan-compose-region."
;;;###autoload ;;;###autoload
(defun tibetan-pre-write-conversion (from to) (defun tibetan-pre-write-conversion (from to)
(setq tibetan-decomposed-temp tibetan-decomposed) (setq tibetan-decomposed-temp tibetan-decomposed)
(let ((old-buf (current-buffer)) (let ((old-buf (current-buffer)))
(work-buf (get-buffer-create " *tibetan-work*"))) (with-temp-buffer
(set-buffer work-buf) (if (stringp from)
(erase-buffer) (insert from)
(if (stringp from) (insert-buffer-substring old-buf from to))
(insert from) (if (not tibetan-decomposed-temp)
(insert-buffer-substring old-buf from to)) (tibetan-decompose-region (point-min) (point-max))))
(if (not tibetan-decomposed-temp)
(tibetan-decompose-region (point-min) (point-max)))
;; Should return nil as annotations. ;; Should return nil as annotations.
nil)) nil))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment