Commit 7595c625 authored by David Byers's avatar David Byers
Browse files

Added code to fix buggy MULE compatibility functions found in TM and APEL

parent 24f9f45f
2000-05-23 David Byers <>
* compatibility.el: Detect buggy versions of encode-coding-string
and decode-coding-string and provide a correcting wrapper.
* lyskom-rest.el (lyskom-w3-region): Remove compiler warning about
unreferenced variable.
(lyskom-do-insert): Same here.
......@@ -30,6 +30,8 @@ till funktionen, helst ocks
** lyskom-unicase använder aset för att sätta element i en sträng.
** I startup.el så görs en get-collate-table. Skydda anropet från
servrar som inte har get-collate-table.
......@@ -304,7 +304,7 @@ string to search in."
(setq enable-multibyte-characters arg))
(lyskom-provide-function set-process-coding-system (proc &optional encoding decoding)
(lyskom-provide-function encode-coding-string (str coding-system) (copy-sequence str))
(lyskom-provide-function decode-coding-string (str coding-system) (copy-sequence str))
......@@ -318,6 +318,26 @@ string to search in."
(lyskom-provide-function string-make-multibyte (str) str)
(lyskom-provide-function multibyte-string-p (str) nil)
;;; Decode buggy versions of encode-coding-string and decode-coding-string
;;; such as those provided by APEL (part of TM and often included in XEmacs)
(defun buggy-encode-coding-string (str coding-system) str)
(if (let ((test "TEM")) (eq (encode-coding-string test 'raw-text) test))
(progn (fset 'buggy-encode-coding-string
(symbol-function 'encode-coding-string))
(defun encode-coding-string (str coding-system)
(copy-sequence (buggy-encode-coding-string str coding-system))))))
(defun buggy-decode-coding-string (str coding-system) str)
(if (let ((test "TEM")) (eq (decode-coding-string test 'raw-text) test))
(progn (fset 'buggy-decode-coding-string
(symbol-function 'decode-coding-string))
(defun decode-coding-string (str coding-system)
(copy-sequence (buggy-decode-coding-string str coding-system))))))
(defmacro lyskom-encode-coding-char (c system) c)
......@@ -784,12 +784,7 @@ name of the day of week."
(elt now 6)))))
(defun lyskom-client-date ()
"Format the current client time as a string.
The optional format string FMT specifies the format. If no format string
is supplied time-yyyy-mm-dd-hh-mm is used. The arguments to the format
string are the following: the year, the month, the day, the hour, the
minutes, the seconds, the full name of the day of week, the abbreviated
name of the day of week."
"Return the current time at the client as a LysKOM time structure."
(let ((now (decode-time)))
(lyskom-create-time (elt now 0) ;sec
(elt now 1) ;min
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