]> git.eshelyaron.com Git - emacs.git/commitdiff
(make-coding-system): Describe
authorKenichi Handa <handa@m17n.org>
Thu, 7 Jul 2005 06:23:10 +0000 (06:23 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 7 Jul 2005 06:23:10 +0000 (06:23 +0000)
`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.

lisp/ChangeLog
lisp/international/mule.el

index 4a3ce31d8cd8e36e62e05804485384f0c15a74ec..a40afc7733a19bef9c5100016b95f1165a3e8af8 100644 (file)
@@ -1,3 +1,19 @@
+2005-07-07  Kenichi Handa  <handa@m17n.org>
+
+       * international/mule.el (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.
+
+       * international/mule-cmds.el (set-default-coding-systems): Don't
+       set default-file-name-coding-system and
+       default-keyboard-coding-system if coding-system is
+       ASCII-incompatible.
+
+       * international/utf-16.el: Declare that all UTF-16-based coding
+       systems ASCII-incompatible.
+
 2005-07-07  Nick Roberts  <nickrob@snap.net.nz>
 
        * progmodes/gud.el: Require font-lock for displaying errors.
index cf5c2c75a6a39e96d1d9941bc42c0d5cb616aab7..741a6c7eff571300a652d4d86f68d1c9dd5ef555 100644 (file)
@@ -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)))