Commit 68a0d892 authored by Daiki Ueno's avatar Daiki Ueno
Browse files

epa-file: fix garble with decode-coding-inserted-region

* epa-file.el (epa-file-decode-and-insert): Use string-to-multibyte
instead of set-buffer-multibyte.
parent d8937064
2009-04-18 ARISAWA Akihiro <ari@mbf.ocn.ne.jp>
* epa-file.el (epa-file-decode-and-insert): Use
string-to-multibyte instead of set-buffer-multibyte.
<http://sourceforge.jp/ticket/browse.php?group_id=2267&tid=15259>
2009-04-18 Yann Hodique <yann.hodique@gmail.com> (tiny change)
 
* net/rcirc.el (rcirc): Use correct property names (Bug#3037).
......
......@@ -86,14 +86,13 @@
(if (fboundp 'decode-coding-inserted-region)
(save-restriction
(narrow-to-region (point) (point))
(let ((multibyte enable-multibyte-characters))
(set-buffer-multibyte nil)
(insert string)
(set-buffer-multibyte multibyte)
(insert (if enable-multibyte-characters
(string-to-multibyte string)
string))
(decode-coding-inserted-region
(point-min) (point-max)
(substring file 0 (string-match epa-file-name-regexp file))
visit beg end replace)))
visit beg end replace))
(insert (epa-file--decode-coding-string string (or coding-system-for-read
'undecided)))))
......
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