"Set coding system for decoding and encoding file names to CODING-SYSTEM.
It actually just set the variable `file-name-coding-system' (which
see) to CODING-SYSTEM."
- (interactive "zCoding system for file names (default, nil): ")
+ (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))
+ (not (coding-system-get coding-system :ascii-compatible-p))
+ (not (coding-system-get coding-system :suitable-for-file-name)))
+ (error "%s is not suitable for file names" coding-system))
(setq file-name-coding-system coding-system))
(defvar default-terminal-coding-system nil
(interactive
(list (read-coding-system
(if last-next-selection-coding-system
- (format "Coding system for the next selection (default, %S): "
- (format "Coding system for the next X selection (default %S): "
++ (format "Coding system for the next selection (default %S): "
last-next-selection-coding-system)
- "Coding system for the next X selection: ")
+ "Coding system for the next selection: ")
last-next-selection-coding-system)))
(if coding-system
(setq last-next-selection-coding-system coding-system)