From: Bruno Haible Date: Mon, 28 Oct 2002 14:26:42 +0000 (+0000) Subject: Restore old code for XEmacs. X-Git-Tag: v0.12~1256 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f52381cac64bcff2acbc15798e1811c57c595386;p=thirdparty%2Fgettext.git Restore old code for XEmacs. --- diff --git a/misc/ChangeLog b/misc/ChangeLog index 278e3c1e3..b07202042 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,8 @@ +2002-10-25 Karl Eichwalder + + * po-compat.el (po-find-file-coding-system-guts): Provide the old + version (pre 2002-09-27) for XEmacs. + 2002-10-16 Bruno Haible * po-compat.el: Remove call of codepage-setup of all support codepages. diff --git a/misc/po-compat.el b/misc/po-compat.el index 8aee214c3..67fc6ac27 100644 --- a/misc/po-compat.el +++ b/misc/po-compat.el @@ -181,7 +181,7 @@ Content-Type into a Mule coding system.") (match-string 1)))))) (eval-and-compile - (if (or po-EMACS20 po-XEMACS) + (if po-EMACS20 (defun po-find-file-coding-system-guts (operation filename) "\ Return a Mule (DECODING . ENCODING) pair, according to PO file charset. @@ -210,6 +210,25 @@ Called through file-coding-system-alist, before the file is visited for real." (t 'no-conversion)))))))) + (if po-XEMACS + (defun po-find-file-coding-system-guts (operation filename) + "\ +Return a Mule (DECODING . ENCODING) pair, according to PO file charset. +Called through file-coding-system-alist, before the file is visited for real." + (and (eq operation 'insert-file-contents) + (file-exists-p filename) + (po-with-temp-buffer + (let ((coding-system-for-read 'no-conversion)) + (let* ((charset (or (po-find-charset filename) + "ascii")) + (charset-upper (intern (upcase charset))) + (charset-lower (intern (downcase charset)))) + (list (or (cdr (assq charset-upper + po-content-type-charset-alist)) + (if (memq charset-lower (coding-system-list)) + charset-lower + 'no-conversion))))))))) + (if po-EMACS20 (defun po-find-file-coding-system (arg-list) "\