# HG changeset patch # User Kenichi Handa # Date 964678533 0 # Node ID 6ca8f913d1df9c57cb0c37eff948fe9cc86f3359 # Parent 822b51279bd3ed3ecc6cd611236646ad8c17fb5f (cp-coding-system-for-codepage-1): Give `safe-chars' property to make-coding-system. diff -r 822b51279bd3 -r 6ca8f913d1df lisp/international/codepage.el --- a/lisp/international/codepage.el Thu Jul 27 06:09:25 2000 +0000 +++ b/lisp/international/codepage.el Thu Jul 27 06:15:33 2000 +0000 @@ -58,6 +58,7 @@ (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 @@ (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 @@ " 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)