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
(candidates (cp-supported-codepages)))
(list (completing-read "Setup DOS Codepage: (default 437) " candidates
nil t nil nil "437"))))
- (let ((cp (format "cp%s" codepage)))
- (cp-make-coding-systems-for-codepage
- cp (cp-charset-for-codepage cp) (cp-offset-for-codepage cp))))
+ (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)))))
(provide 'codepage)