summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2002-10-16 13:09:57 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:08:46 +0200
commit5fb2ca25c7ad51bececc9dfb5854a617398a906d (patch)
tree86c53014b9c0e26ceebfb014acbe3fa240c1307b /misc
parent52cb50b88131546394eb403bb82e8895583c7cfd (diff)
downloadexternal_gettext-5fb2ca25c7ad51bececc9dfb5854a617398a906d.zip
external_gettext-5fb2ca25c7ad51bececc9dfb5854a617398a906d.tar.gz
external_gettext-5fb2ca25c7ad51bececc9dfb5854a617398a906d.tar.bz2
Simplify last change, and make it portable to XEmacs.
Diffstat (limited to 'misc')
-rw-r--r--misc/ChangeLog5
-rw-r--r--misc/po-compat.el28
2 files changed, 15 insertions, 18 deletions
diff --git a/misc/ChangeLog b/misc/ChangeLog
index 58acf99..278e3c1 100644
--- a/misc/ChangeLog
+++ b/misc/ChangeLog
@@ -1,3 +1,8 @@
+2002-10-16 Bruno Haible <bruno@clisp.org>
+
+ * po-compat.el: Remove call of codepage-setup of all support codepages.
+ (po-find-file-coding-system-guts): Avoid code duplication.
+
2002-09-27 Karl Eichwalder <ke@suse.de>
* po-compat.el (po-content-type-charset-alist): Convert the
diff --git a/misc/po-compat.el b/misc/po-compat.el
index a06cbe4..8aee214 100644
--- a/misc/po-compat.el
+++ b/misc/po-compat.el
@@ -69,10 +69,6 @@
(and (buffer-name ,temp-buffer)
(kill-buffer ,temp-buffer))))))))
-; Make the cpnnn codesets available.
-(if po-EMACS20
- (mapcar #'codepage-setup (mapcar #'car (cp-supported-codepages))))
-
(defconst po-content-type-charset-alist
'(; Note: Emacs 21 doesn't support all encodings, thus the missing entries.
("ASCII" . undecided)
@@ -199,22 +195,18 @@ Called through file-coding-system-alist, before the file is visited for real."
(charset-lower (downcase charset))
(candidate
(cdr (assoc charset-upper po-content-type-charset-alist)))
- (try (or candidate (intern-soft charset-lower))))
- (list (cond ((and try (coding-system-p try))
- try)
- ((and try
+ (try-symbol (or candidate (intern-soft charset-lower)))
+ (try-string
+ (if try-symbol (symbol-name try-symbol) charset-lower)))
+ (list (cond ((and try-symbol (coding-system-p try-symbol))
+ try-symbol)
+ ((and po-EMACS20
(string-match "\\`cp[1-9][0-9][0-9]?\\'"
- (symbol-name try))
- (assoc (substring (symbol-name try) 2)
- (cp-supported-codepages)))
- (codepage-setup (substring (symbol-name try) 2))
- try)
- ((and (string-match "\\`cp[1-9][0-9][0-9]?\\'"
- charset-lower)
- (assoc (substring charset-lower 2)
+ try-string)
+ (assoc (substring try-string 2)
(cp-supported-codepages)))
- (codepage-setup (substring charset-lower 2))
- (intern charset-lower))
+ (codepage-setup (substring try-string 2))
+ (intern try-string))
(t
'no-conversion))))))))