From: Bruno Haible Date: Tue, 18 Feb 2003 13:16:47 +0000 (+0000) Subject: Make it work again wih XEmacs. X-Git-Tag: v0.12~214 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89e9e925e28d9aefcceea8a00e1399afe2e483a6;p=thirdparty%2Fgettext.git Make it work again wih XEmacs. --- diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog index 73aade5f2..a6a984a38 100644 --- a/gettext-tools/misc/ChangeLog +++ b/gettext-tools/misc/ChangeLog @@ -1,3 +1,10 @@ +2003-02-16 Bruno Haible + + * po-compat.el: Add testing instructions. + (po-find-file-coding-system-guts) [XEMACS]: Make it work again, + after (car (nth i po-content-type-charset-alist)) changed from symbol + to string. + 2003-02-12 Bruno Haible * elisp-comp: Move to ../../config/elisp-comp. diff --git a/gettext-tools/misc/po-compat.el b/gettext-tools/misc/po-compat.el index 67fc6ac27..e5dde5cfc 100644 --- a/gettext-tools/misc/po-compat.el +++ b/gettext-tools/misc/po-compat.el @@ -221,10 +221,10 @@ Called through file-coding-system-alist, before the file is visited for real." (let ((coding-system-for-read 'no-conversion)) (let* ((charset (or (po-find-charset filename) "ascii")) - (charset-upper (intern (upcase charset))) + (charset-upper (upcase charset)) (charset-lower (intern (downcase charset)))) - (list (or (cdr (assq charset-upper - po-content-type-charset-alist)) + (list (or (cdr (assoc charset-upper + po-content-type-charset-alist)) (if (memq charset-lower (coding-system-list)) charset-lower 'no-conversion))))))))) @@ -247,4 +247,17 @@ Called through file-coding-system-alist, before the file is visited for real." (provide 'po-compat) +;;; Testing this file: + +;; For each emacsimpl in { emacs, xemacs } do +;; For each pofile in { +;; cs.po ; gettext/po/cs.el, charset=ISO-8859-2 +;; cs-modified.po ; gettext/po/cs.el, charset=ISO_8859-2 +;; de.po ; gettext/po/de.el, charset=UTF-8, if $emacsimpl = emacs +;; } do +;; Start $emacsimpl +;; M-x load-file po-compat.el RET +;; C-x C-f $pofile RET +;; Verify charset marker in status line ('2' = ISO-8859-2, 'u' = UTF-8). + ;;; po-compat.el ends here