summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2002-10-28 14:26:42 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:08:47 +0200
commitf52381cac64bcff2acbc15798e1811c57c595386 (patch)
tree0df6b8a4bd25ac8d72d9b1fdfd43e1c47eafdd11 /misc
parent8c68133ecd43a561d80b060249a5c4e128763ee8 (diff)
downloadexternal_gettext-f52381cac64bcff2acbc15798e1811c57c595386.zip
external_gettext-f52381cac64bcff2acbc15798e1811c57c595386.tar.gz
external_gettext-f52381cac64bcff2acbc15798e1811c57c595386.tar.bz2
Restore old code for XEmacs.
Diffstat (limited to 'misc')
-rw-r--r--misc/ChangeLog5
-rw-r--r--misc/po-compat.el21
2 files changed, 25 insertions, 1 deletions
diff --git a/misc/ChangeLog b/misc/ChangeLog
index 278e3c1..b072020 100644
--- a/misc/ChangeLog
+++ b/misc/ChangeLog
@@ -1,3 +1,8 @@
+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.
diff --git a/misc/po-compat.el b/misc/po-compat.el
index 8aee214..67fc6ac 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)
"\