comparison lisp/international/code-pages.el @ 50184:fb92861f566e

(cp-fix-safe-chars): Make it obsolete. (cp-make-coding-system): Don't call cp-fix-safe-chars.
author Kenichi Handa <handa@m17n.org>
date Tue, 18 Mar 2003 04:25:02 +0000
parents bc572bfebdfc
children 1dd164759685
comparison
equal deleted inserted replaced
50183:42387e68072a 50184:fb92861f566e
93 (setq i (1+ i))) 93 (setq i (1+ i)))
94 (if start (push (cons start end) pairs)) 94 (if start (push (cons start end) pairs))
95 (nreverse pairs))) 95 (nreverse pairs)))
96 96
97 (defun cp-fix-safe-chars (cs) 97 (defun cp-fix-safe-chars (cs)
98 "Remove `char-coding-system-table' entries from previous definition of CS. 98 "This is an obsolete function.
99 CS is a base coding system or alias." 99 It exists just for backward compatibility, and it does nothing.")
100 (when (coding-system-p cs) 100 (make-obsolete 'cp-fix-safe-chars
101 (let ((chars (coding-system-get cs 'safe-chars))) 101 "Unnecessary function. Calling it has no effect."
102 (map-char-table 102 "21.3")
103 (lambda (k v)
104 (if (and v (not (eq v t)))
105 (aset char-coding-system-table
106 k
107 (remq cs (aref char-coding-system-table k)))))
108 chars))))
109 103
110 ;; Fix things that have been, or might be, done by codepage.el. 104 ;; Fix things that have been, or might be, done by codepage.el.
111 (eval-after-load "codepage" 105 (eval-after-load "codepage"
112 '(progn 106 '(progn
113
114 (dolist (cs '(cp857 cp861 cp1253 cp852 cp866 cp437 cp855 cp869 cp775
115 cp862 cp864 cp1250 cp863 cp865 cp1251 cp737 cp1257 cp850
116 cp860 cp851 720))
117 (cp-fix-safe-chars cs))
118 107
119 ;; Semi-dummy version for the stuff in codepage.el which we don't 108 ;; Semi-dummy version for the stuff in codepage.el which we don't
120 ;; define here. (Used by mule-diag.) 109 ;; define here. (Used by mule-diag.)
121 (defun cp-supported-codepages () 110 (defun cp-supported-codepages ()
122 "Return an alist of supported codepages. 111 "Return an alist of supported codepages.
196 `(let ((translation-table (cp-make-translation-table ,v)) 185 `(let ((translation-table (cp-make-translation-table ,v))
197 (codes (cp-valid-codes ,v))) 186 (codes (cp-valid-codes ,v)))
198 (define-translation-table ',decoder translation-table) 187 (define-translation-table ',decoder translation-table)
199 (define-translation-table ',encoder 188 (define-translation-table ',encoder
200 (char-table-extra-slot translation-table 0)) 189 (char-table-extra-slot translation-table 0))
201 (cp-fix-safe-chars ',name)
202 (make-coding-system 190 (make-coding-system
203 ',name 4 ,(or mnemonic ?*) 191 ',name 4 ,(or mnemonic ?*)
204 (or ,doc-string (format "%s encoding" ',name)) 192 (or ,doc-string (format "%s encoding" ',name))
205 (cons ,ccl-decoder ,ccl-encoder) 193 (cons ,ccl-decoder ,ccl-encoder)
206 (list (cons 'safe-chars (get ',encoder 'translation-table)) 194 (list (cons 'safe-chars (get ',encoder 'translation-table))