+2002-10-25 Karl Eichwalder <ke@suse.de>
+
+ * po-compat.el (po-find-file-coding-system-guts): Provide the old
+ version (pre 2002-09-27) for XEmacs.
+
2002-10-16 Bruno Haible <bruno@clisp.org>
* po-compat.el: Remove call of codepage-setup of all support codepages.
(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.
(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)
"\