# HG changeset patch # User Dave Love # Date 1062694786 0 # Node ID 528d8a1b09d591823898e809f5ec85cd1fb55594 # Parent 14a91089126a277d145e0d4fb7a3460ff9972003 ("mule-diag"): Add eval-after-load clause. diff -r 14a91089126a -r 528d8a1b09d5 lisp/international/codepage.el --- a/lisp/international/codepage.el Thu Sep 04 16:59:00 2003 +0000 +++ b/lisp/international/codepage.el Thu Sep 04 16:59:46 2003 +0000 @@ -666,6 +666,25 @@ (cp-make-coding-systems-for-codepage cp (cp-charset-for-codepage cp) (cp-offset-for-codepage cp))))) +;; Add DOS codepages to `non-iso-charset-alist'. +(eval-after-load "mule-diag" + '(let ((tail (cp-supported-codepages)) + elt) + (while tail + (setq elt (car tail) tail (cdr tail)) + ;; Now ELT is (CODEPAGE . CHARSET), where CODEPAGE is a string + ;; (e.g. "850"), CHARSET is a charset that characters in CODEPAGE + ;; are mapped to. + (unless (assq (intern (concat "cp" (car elt))) non-iso-charset-alist) + (setq non-iso-charset-alist + (cons (list (intern (concat "cp" (car elt))) + (list 'ascii (cdr elt)) + `(lambda (code) + (decode-codepage-char ,(string-to-int (car elt)) + code)) + (list (list 0 255))) + non-iso-charset-alist)))))) + (provide 'codepage) ;;; arch-tag: 80328de8-b94e-4386-be26-5876105731f0