diff options
author | Kenichi Handa <[email protected]> | 2000-07-27 06:15:33 +0000 |
---|---|---|
committer | Kenichi Handa <[email protected]> | 2000-07-27 06:15:33 +0000 |
commit | ba2a2753020a35f53cad04635758a19a205cc866 (patch) | |
tree | 6ba2d849c7ae126fd3acdf058ab984c765188d3c /lisp | |
parent | b5edd1d103c295ffb5fa4f2971ce8f7e0d005f63 (diff) |
(cp-coding-system-for-codepage-1): Give `safe-chars' property to
make-coding-system.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/international/codepage.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/international/codepage.el b/lisp/international/codepage.el index 5f4b76fe6e..65b2ce2c64 100644 --- a/lisp/international/codepage.el +++ b/lisp/international/codepage.el @@ -58,6 +58,7 @@ external DOS codepage codes." (logand dos-unsupported-char-glyph 255) 127) ??)) + (safe-chars (make-char-table 'safe-chars)) (ccl-decoder (ccl-compile ;; The 4 here supplies the buf_magnification parameter @@ -84,6 +85,16 @@ external DOS codepage codes." (write r1))))) (write-repeat r1)))))) + ;; Set elements of safe multibyte characters for this codepage + ;; to t in the char-table safe-chars. + (let ((tbl (get decoder 'translation-table)) + (i 128) + ch) + (while (< i 256) + (setq ch (aref tbl i)) + (if ch (aset safe-chars ch t)) + (setq i (1+ i)))) + ;; Make coding system CODING. (make-coding-system coding 4 mnemonic @@ -91,6 +102,7 @@ external DOS codepage codes." " characters using IBM codepage " coding-name) (cons ccl-decoder ccl-encoder) `((safe-charsets ascii eight-bit-control eight-bit-graphic ,iso-name) + (safe-chars . ,safe-chars) (valid-codes (0 . 255))))))) (defun cp-decoding-vector-for-codepage (table charset offset) |