Commit 7dd4fd43 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(codepage-setup): Don't define a codepage if it is already defined.

parent 55859ca7
2002-03-16 Eli Zaretskii <eliz@is.elta.co.il>
* international/codepage.el (codepage-setup): Don't define a
codepage if it is already defined.
* textmodes/po.el (po-find-charset): Search for the Charset=
header even if we've read less than 4KB.
<top-level>: Remove the setup for all known codepages: it seems
......
......@@ -659,9 +659,12 @@ read/written by MS-DOS software, or for display on the MS-DOS terminal."
(candidates (cp-supported-codepages)))
(list (completing-read "Setup DOS Codepage: (default 437) " candidates
nil t nil nil "437"))))
(let ((cp (format "cp%s" codepage)))
(let* ((cp (format "cp%s" codepage))
(cp-defined (intern-soft cp)))
(or (and cp-defined ;; avoid defining if already defined
(coding-system-p cp-defined))
(cp-make-coding-systems-for-codepage
cp (cp-charset-for-codepage cp) (cp-offset-for-codepage cp))))
cp (cp-charset-for-codepage cp) (cp-offset-for-codepage cp)))))
(provide 'codepage)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment