# HG changeset patch # User Kenichi Handa # Date 1120717290 0 # Node ID 9f966287a5352c79d8cf49c0be35f7d991ef7bc5 # Parent 8ee5c917c0690d3c3ef775e27a6ed6a65616b4e4 (make-coding-system): Describe `ascii-incompatible' property in the docstring. (set-file-name-coding-system): Signal an error if coding-system is ascii-incompatible. (set-keyboard-coding-system): Likewise. diff -r 8ee5c917c069 -r 9f966287a535 lisp/international/mule.el --- a/lisp/international/mule.el Thu Jul 07 06:20:13 2005 +0000 +++ b/lisp/international/mule.el Thu Jul 07 06:21:30 2005 +0000 @@ -839,6 +839,12 @@ If the value is non-nil, the coding system preserves composition information. + o ascii-incompatible + + If the value is non-nil, the coding system is not compatible + with ASCII, which means it encodes or decodes ASCII character + string to the different byte sequence. + These properties are set in PLIST, a property list. This function also sets properties `coding-category' and `alias-coding-systems' automatically. @@ -1191,6 +1197,9 @@ see) to CODING-SYSTEM." (interactive "zCoding system for file names (default, nil): ") (check-coding-system coding-system) + (if (and coding-system + (coding-system-get coding-system 'ascii-incompatible)) + (error "%s is not ASCII-compatible" coding-system)) (setq file-name-coding-system coding-system)) (defvar default-terminal-coding-system nil @@ -1247,6 +1256,9 @@ (setq coding-system default-keyboard-coding-system)) (if coding-system (setq default-keyboard-coding-system coding-system)) + (if (and coding-system + (coding-system-get coding-system 'ascii-incompatible)) + (error "%s is not ASCII-compatible" coding-system)) (set-keyboard-coding-system-internal coding-system) (setq keyboard-coding-system coding-system) (encoded-kbd-mode (if coding-system 1 0)))