diff options
| author | Kenichi Handa | 2005-02-21 12:53:33 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2005-02-21 12:53:33 +0000 |
| commit | 002dc23966fa58f46a9f6274c365563f56d7eaae (patch) | |
| tree | cce98e59ffe6101eb86bf88de7e9b1e909463825 | |
| parent | d782c34829ed3aca9e4debb63b30568178407486 (diff) | |
| download | emacs-002dc23966fa58f46a9f6274c365563f56d7eaae.tar.gz emacs-002dc23966fa58f46a9f6274c365563f56d7eaae.zip | |
(ctext-pre-write-conversion): Always use
" *code-converting-work*" buffer for work.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/international/mule.el | 24 |
2 files changed, 16 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 57c64a66da2..b2113b8d0f4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2005-02-21 Kenichi Handa <handa@m17n.org> | 1 | 2005-02-21 Kenichi Handa <handa@m17n.org> |
| 2 | 2 | ||
| 3 | * international/mule.el (ctext-pre-write-conversion): Always use | ||
| 4 | " *code-converting-work*" buffer for work. | ||
| 5 | |||
| 3 | * textmodes/ispell.el (ispell-dictionary-alist): Fix docstring. | 6 | * textmodes/ispell.el (ispell-dictionary-alist): Fix docstring. |
| 4 | 7 | ||
| 5 | 2005-02-20 Thien-Thi Nguyen <ttn@gnu.org> | 8 | 2005-02-20 Thien-Thi Nguyen <ttn@gnu.org> |
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 5ba6f1d69e4..9a5646217ec 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el | |||
| @@ -1467,18 +1467,20 @@ If FROM is a string, or if the current buffer is not the one set up for us | |||
| 1467 | by encode-coding-string, generate a new temp buffer, insert the | 1467 | by encode-coding-string, generate a new temp buffer, insert the |
| 1468 | text, and convert it in the temporary buffer. Otherwise, convert in-place." | 1468 | text, and convert it in the temporary buffer. Otherwise, convert in-place." |
| 1469 | (save-match-data | 1469 | (save-match-data |
| 1470 | ;; Setup a working buffer if necessary. | 1470 | (let ((workbuf (get-buffer-create " *code-conversion-work*"))) |
| 1471 | (cond ((stringp from) | 1471 | ;; Setup a working buffer if necessary. |
| 1472 | (let ((buf (current-buffer))) | 1472 | (cond ((stringp from) |
| 1473 | (set-buffer (generate-new-buffer " *temp")) | 1473 | (set-buffer workbuf) |
| 1474 | (erase-buffer) | ||
| 1474 | (set-buffer-multibyte (multibyte-string-p from)) | 1475 | (set-buffer-multibyte (multibyte-string-p from)) |
| 1475 | (insert from))) | 1476 | (insert from)) |
| 1476 | ((not (string= (buffer-name) " *code-converting-work*")) | 1477 | ((not (eq (current-buffer) workbuf)) |
| 1477 | (let ((buf (current-buffer)) | 1478 | (let ((buf (current-buffer)) |
| 1478 | (multibyte enable-multibyte-characters)) | 1479 | (multibyte enable-multibyte-characters)) |
| 1479 | (set-buffer (generate-new-buffer " *temp")) | 1480 | (set-buffer workbuf) |
| 1480 | (set-buffer-multibyte multibyte) | 1481 | (erase-buffer) |
| 1481 | (insert-buffer-substring buf from to)))) | 1482 | (set-buffer-multibyte multibyte) |
| 1483 | (insert-buffer-substring buf from to))))) | ||
| 1482 | 1484 | ||
| 1483 | ;; Now we can encode the whole buffer. | 1485 | ;; Now we can encode the whole buffer. |
| 1484 | (let ((encoding-table (ctext-non-standard-encodings-table)) | 1486 | (let ((encoding-table (ctext-non-standard-encodings-table)) |