Commit 68b5125f authored by Ulrik Haugen's avatar Ulrik Haugen
Browse files

Lagt in Marcus Comstedts patch från bug 586.

parent 02ec175c
......@@ -1952,6 +1952,12 @@ Deferred insertions are not supported."
(length tmp)
'(special-insert lyskom-postprocess-text)
(when (and (fboundp 'latin-unity-remap-region)
(lyskom-try-require 'latin-unity))
(add-text-properties 0
(length tmp)
'(special-insert lyskom-unity-text)
(defun lyskom-postprocess-text (start end &rest args)
......@@ -1959,6 +1965,19 @@ Deferred insertions are not supported."
(smiley-region start (min (point-max) (1+ end)))
(error nil)))
(defun lyskom-unity-text (start end &rest args)
(condition-case nil
(let ((codesys (car latin-unity-preferred-coding-system-list)))
(when (memq codesys latin-unity-iso-8859-1-aliases)
(setq codesys 'iso-8859-1))
(let ((gr (or (car (rassq codesys latin-unity-cset-codesys-alist))
(and codesys
(eq (coding-system-type codesys) 'iso2022)
(coding-system-property codesys 'charset-g1)))))
(when gr
(latin-unity-remap-region start (min (point-max) (1+ end))
gr nil t))))
(error nil)))
Supports Markdown
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