Commit e3e0d587 authored by David Byers's avatar David Byers

Fix encoding problems in user area (hopefully bug 1524).

Detailed changes:
> 2005-03-08  David Byers  <byers@lysator.liu.se>
>
> 	* compatibility.el (lyskom-encode-coding-string): Renamed
> 	functions used when detecting copy bug. Detect multibyte bug.
> 	This hopefully fixes bug 1524.
>
parent 08ca6b33
2005-03-08 David Byers <byers@lysator.liu.se>
* compatibility.el (lyskom-encode-coding-string): Renamed
functions used when detecting copy bug. Detect multibyte bug.
This hopefully fixes bug 1524.
2005-03-07 David Byers <byers@lysator.liu.se>
* lyskom-rest.el (lyskom-face-default-p): New implementation since
......
......@@ -240,13 +240,30 @@ KEYS should be a string in the format used for saving keyboard macros
;; decode-coding-string such as those provided by APEL (part of TM and
;; often included in XEmacs)
(defun lyskom-buggy-encode-coding-string (str coding-system) str)
(defun lyskom-encode-coding-string-with-copy-bug (str coding-system) str)
(eval-and-compile
(if (let ((test "TEM")) (eq (lyskom-encode-coding-string test 'raw-text) test))
(progn (fset 'lyskom-buggy-encode-coding-string
(progn (fset 'lyskom-encode-coding-string-with-copy-bug
(symbol-function 'lyskom-encode-coding-string))
(defun lyskom-encode-coding-string (str coding-system)
(copy-sequence (lyskom-buggy-encode-coding-string str coding-system))))))
(copy-sequence (lyskom-encode-coding-string-with-copy-bug
str coding-system))))))
;; Emacs 20.7, 21.2, 21.3 and CVS versions before 2005-02-14 have a bug
;; where the result of encode-coding-string is sometimes a multibyte
;; string. Detect this problem.
(defun lyskom-encode-coding-string-with-multibyte-bug (str coding-system) str)
(eval-and-compile
(if (lyskom-multibyte-string-p
(lyskom-encode-coding-string
(substring (concat "" (make-string 1025 ?x)) 1) 'iso-8859-1))
(progn (fset 'lyskom-encode-coding-string-with-multibyte-bug
(symbol-function 'lyskom-encode-coding-string))
(defun lyskom-encode-coding-string (str coding-system)
(string-make-unibyte
(lyskom-encode-coding-string-with-multibyte-bug str coding-system))))))
(defun lyskom-buggy-decode-coding-string (str coding-system) str)
(eval-and-compile
......
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