Mercurial > emacs
changeset 52435:528d8a1b09d5
("mule-diag"): Add eval-after-load
clause.
author | Dave Love <fx@gnu.org> |
---|---|
date | Thu, 04 Sep 2003 16:59:46 +0000 |
parents | 14a91089126a |
children | d095f4512252 |
files | lisp/international/codepage.el |
diffstat | 1 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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