aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2002-03-16 16:42:37 +0000
committerEli Zaretskii2002-03-16 16:42:37 +0000
commit7dd4fd43473fff089d69ac2ed17ede7077b2d90a (patch)
tree00b0d1516eab858044a355db20d1a06722d8fba7
parent55859ca7d85fea20aed7d810985883db863f8234 (diff)
downloademacs-7dd4fd43473fff089d69ac2ed17ede7077b2d90a.tar.gz
emacs-7dd4fd43473fff089d69ac2ed17ede7077b2d90a.zip
(codepage-setup): Don't define a codepage if it is already defined.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/international/codepage.el9
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 35a70e7f8e0..f9d6ed979ae 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12002-03-16 Eli Zaretskii <eliz@is.elta.co.il> 12002-03-16 Eli Zaretskii <eliz@is.elta.co.il>
2 2
3 * international/codepage.el (codepage-setup): Don't define a
4 codepage if it is already defined.
5
3 * textmodes/po.el (po-find-charset): Search for the Charset= 6 * textmodes/po.el (po-find-charset): Search for the Charset=
4 header even if we've read less than 4KB. 7 header even if we've read less than 4KB.
5 <top-level>: Remove the setup for all known codepages: it seems 8 <top-level>: Remove the setup for all known codepages: it seems
diff --git a/lisp/international/codepage.el b/lisp/international/codepage.el
index c0d5405af68..01bf5a20532 100644
--- a/lisp/international/codepage.el
+++ b/lisp/international/codepage.el
@@ -659,9 +659,12 @@ read/written by MS-DOS software, or for display on the MS-DOS terminal."
659 (candidates (cp-supported-codepages))) 659 (candidates (cp-supported-codepages)))
660 (list (completing-read "Setup DOS Codepage: (default 437) " candidates 660 (list (completing-read "Setup DOS Codepage: (default 437) " candidates
661 nil t nil nil "437")))) 661 nil t nil nil "437"))))
662 (let ((cp (format "cp%s" codepage))) 662 (let* ((cp (format "cp%s" codepage))
663 (cp-make-coding-systems-for-codepage 663 (cp-defined (intern-soft cp)))
664 cp (cp-charset-for-codepage cp) (cp-offset-for-codepage cp)))) 664 (or (and cp-defined ;; avoid defining if already defined
665 (coding-system-p cp-defined))
666 (cp-make-coding-systems-for-codepage
667 cp (cp-charset-for-codepage cp) (cp-offset-for-codepage cp)))))
665 668
666(provide 'codepage) 669(provide 'codepage)
667 670