Commit 5396ef6e authored by Ulrik Haugen's avatar Ulrik Haugen

Patch from Marcus Comstedt to select charsets latin-x more often.

"Buggarna var:

1) kom-edit-send gjorde (lyskom-mime-charset-for-text) på texten
utan att köra (lyskom-unity-text) på den först. Det var detta som
fick UTF-8 att okynnesväljas så snart det fanns mer än ett
teckenset, även om de kunde unifieras.

2) lyskom-unity-text provade inte alla preferred-coding-system i
listan, utan bara det första."

* edit-text.el (lyskom-edit-send): Call lyskom-unity-text before
selecting charset.

* lyskom-rest.el (lyskom-unity-text): Try all elements in
preferred-coding-system.
parent 8c6219eb
2011-06-06 Ulrik Haugen <ulrik@haugen.se>
Patch from Marcus Comstedt to select charsets latin-x more often.
"Buggarna var:
1) kom-edit-send gjorde (lyskom-mime-charset-for-text) p texten
utan att kra (lyskom-unity-text) p den frst. Det var detta som
fick UTF-8 att okynnesvljas s snart det fanns mer n ett
teckenset, ven om de kunde unifieras.
2) lyskom-unity-text provade inte alla preferred-coding-system i
listan, utan bara det frsta."
* edit-text.el (lyskom-edit-send): Call lyskom-unity-text before
selecting charset.
* lyskom-rest.el (lyskom-unity-text): Try all elements in
preferred-coding-system.
2010-05-14 David Byers <davby@ida.liu.se>
Fix bug 1679:
......
......@@ -574,6 +574,7 @@ This runs `kom-send-text-hook' and (for backwards compatibility)
'charset)))
(mime-charset (with-temp-buffer
(insert full-message)
(lyskom-unity-text (point-min) (point-max))
(lyskom-mime-charset-for-text (point-min) (point-max)))))
;; If the charset isn't already set, encode the string
......
......@@ -2374,8 +2374,10 @@ reappears."
(defvar latin-unity-cset-codesys-alist)
(defun lyskom-unity-text (start end &rest args)
(condition-case nil
(let ((codesys (car latin-unity-preferred-coding-system-list)))
(some
(lambda (codesys)
(condition-case nil
(progn
(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))
......@@ -2385,8 +2387,8 @@ reappears."
(when gr
(latin-unity-remap-region start (min (point-max) (1+ end))
gr nil t))))
(error nil))))
(error nil)))
latin-unity-preferred-coding-system-list)))
(defmacro lyskom-format-plaintext-fonts-body ()
"Internal macro for lyskom-format-plaintext-fonts"
......
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