diff options
author | Kenichi Handa <handa@m17n.org> | 2004-08-27 00:25:59 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2004-08-27 00:25:59 +0000 |
commit | 11d2e01ba3a82c41eec105df81260568f048e726 (patch) | |
tree | 6f6624459c1e749d84ca09c0396aad926e6b08a1 /lisp | |
parent | 383418e5122ee80b530e7df96c27be7cffd8a5f1 (diff) | |
download | emacs-11d2e01ba3a82c41eec105df81260568f048e726.tar.gz emacs-11d2e01ba3a82c41eec105df81260568f048e726.tar.bz2 emacs-11d2e01ba3a82c41eec105df81260568f048e726.zip |
(utf-8-post-read-conversion): If the
buffer is unibyte, temporarily set it multibyte.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/international/utf-8.el | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2141bcd959f..66ef44650d5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-08-27 Kenichi Handa <handa@m17n.org> + + * international/utf-8.el (utf-8-post-read-conversion): If the + buffer is unibyte, temporarily make it multibyte. + 2004-08-27 Masatake YAMATO <jet@gyve.org> * calendar/time-date.el (time-to-seconds): Add autoload cookies. diff --git a/lisp/international/utf-8.el b/lisp/international/utf-8.el index bad79b58743..5a7acee0f0e 100644 --- a/lisp/international/utf-8.el +++ b/lisp/international/utf-8.el @@ -870,7 +870,9 @@ Also compose particular scripts if `utf-8-compose-scripts' is non-nil." ;; version of the string in the loop, since it's always loaded as ;; unibyte from a byte-compiled file. (let ((range (string-as-multibyte "^\xc0-\xc3\xe1-\xf7")) + (buffer-multibyte enable-multibyte-characters) hash-table ch) + (set-buffer-multibyte t) (when utf-translate-cjk-mode (if (not utf-translate-cjk-lang-env) ;; Check these characters: @@ -893,7 +895,9 @@ Also compose particular scripts if `utf-8-compose-scripts' is non-nil." (progn (insert ch) (delete-char 1)) - (forward-char 1))))) + (forward-char 1)))) + (or buffer-multibyte + (set-buffer-multibyte nil))) (when (and utf-8-compose-scripts (> length 1)) ;; These currently have definitions which cover the relevant |