summaryrefslogtreecommitdiff
path: root/lisp/international/mule.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2005-07-07 06:23:10 +0000
committerKenichi Handa <handa@m17n.org>2005-07-07 06:23:10 +0000
commit43b557d50704df1dc45cc201a5596c05b62a6178 (patch)
treeb3ed4e841ba44525170360de169aec082a58d0fe /lisp/international/mule.el
parent4a6cbbc4168e473cde0a3230afbbcc7612b56889 (diff)
downloademacs-43b557d50704df1dc45cc201a5596c05b62a6178.tar.gz
(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.
Diffstat (limited to 'lisp/international/mule.el')
-rw-r--r--lisp/international/mule.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index cf5c2c75a6a..741a6c7eff5 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -839,6 +839,12 @@ following properties are recognized:
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 @@ It actually just set the variable `file-name-coding-system' (which
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 @@ or by the previous use of this command."
(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)))