193 |
;; a separate table that only translates the coding |
;; a separate table that only translates the coding |
194 |
;; system's safe-chars. |
;; system's safe-chars. |
195 |
(cons 'translation-table-for-input 'ucs-mule-to-mule-unicode))) |
(cons 'translation-table-for-input 'ucs-mule-to-mule-unicode))) |
196 |
(push (list ',name |
(let ((slot (assq ',name non-iso-charset-alist)) |
197 |
nil ; charset list |
(elt (list nil ; charset list |
198 |
',decoder |
',decoder |
199 |
(let (l) ; code range |
(let (l) ; code range |
200 |
(dolist (elt (reverse codes)) |
(dolist (elt (reverse codes)) |
201 |
(push (cdr elt) l) |
(push (cdr elt) l) |
202 |
(push (car elt) l)) |
(push (car elt) l)) |
203 |
(list l))) |
(list l))))) |
204 |
non-iso-charset-alist)))) |
(if (not slot) |
205 |
|
(push (cons ',name elt) non-iso-charset-alist) |
206 |
|
(setcdr slot elt) |
207 |
|
non-iso-charset-alist))))) |
208 |
|
|
209 |
(eval-when-compile (defvar non-iso-charset-alist)) |
(eval-when-compile (defvar non-iso-charset-alist)) |
210 |
|
|
4505 |
;; Define cp125* as aliases for all windows-125*, so on Windows |
;; Define cp125* as aliases for all windows-125*, so on Windows |
4506 |
;; we can just concat "cp" to the ANSI codepage we get from the system |
;; we can just concat "cp" to the ANSI codepage we get from the system |
4507 |
;; and not have to worry about whether it should be "cp" or "windows-". |
;; and not have to worry about whether it should be "cp" or "windows-". |
4508 |
(if (coding-system-p w) |
(when (coding-system-p w) |
4509 |
(define-coding-system-alias c w)) |
(define-coding-system-alias c w) |
4510 |
;; Compatibility with codepage.el, though cp... are not the |
;; Compatibility with codepage.el, though cp... are not the |
4511 |
;; canonical names. |
;; canonical names. |
4512 |
(push (assoc w non-iso-charset-alist) non-iso-charset-alist))) |
(if (not (assq c non-iso-charset-alist)) |
4513 |
|
(let ((slot (assq w non-iso-charset-alist))) |
4514 |
|
(if slot |
4515 |
|
(push (cons c (cdr slot)) non-iso-charset-alist))))))) |
4516 |
|
|
4517 |
(provide 'code-pages) |
(provide 'code-pages) |
4518 |
|
|