]> git.eshelyaron.com Git - emacs.git/commitdiff
(ctext-pre-write-conversion): Always use
authorKenichi Handa <handa@m17n.org>
Mon, 21 Feb 2005 12:53:33 +0000 (12:53 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 21 Feb 2005 12:53:33 +0000 (12:53 +0000)
" *code-converting-work*" buffer for work.

lisp/ChangeLog
lisp/international/mule.el

index 57c64a66da2a45bd17be56a42e1b91fbc7b1545e..b2113b8d0f44cd5fd000d9a811b2082ec051ba0f 100644 (file)
@@ -1,5 +1,8 @@
 2005-02-21  Kenichi Handa  <handa@m17n.org>
 
+       * international/mule.el (ctext-pre-write-conversion): Always use
+       " *code-converting-work*" buffer for work.
+
        * textmodes/ispell.el (ispell-dictionary-alist): Fix docstring.
 
 2005-02-20  Thien-Thi Nguyen  <ttn@gnu.org>
index 5ba6f1d69e4a7b041550ef02e7903172bd0dc1f1..9a5646217ec8cb76f92fbecaa861ebed691258ef 100644 (file)
@@ -1467,18 +1467,20 @@ If FROM is a string, or if the current buffer is not the one set up for us
 by encode-coding-string, generate a new temp buffer, insert the
 text, and convert it in the temporary buffer.  Otherwise, convert in-place."
   (save-match-data
-    ;; Setup a working buffer if necessary.
-    (cond ((stringp from)
-          (let ((buf (current-buffer)))
-            (set-buffer (generate-new-buffer " *temp"))
+    (let ((workbuf (get-buffer-create " *code-conversion-work*")))
+      ;; Setup a working buffer if necessary.
+      (cond ((stringp from)
+            (set-buffer workbuf)
+            (erase-buffer)
             (set-buffer-multibyte (multibyte-string-p from))
-            (insert from)))
-         ((not (string= (buffer-name) " *code-converting-work*"))
-          (let ((buf (current-buffer))
-                (multibyte enable-multibyte-characters))
-            (set-buffer (generate-new-buffer " *temp"))
-            (set-buffer-multibyte multibyte)
-            (insert-buffer-substring buf from to))))
+            (insert from))
+           ((not (eq (current-buffer) workbuf))
+            (let ((buf (current-buffer))
+                  (multibyte enable-multibyte-characters))
+              (set-buffer workbuf)
+              (erase-buffer)
+              (set-buffer-multibyte multibyte)
+              (insert-buffer-substring buf from to)))))
 
     ;; Now we can encode the whole buffer.
     (let ((encoding-table (ctext-non-standard-encodings-table))