diff options
Diffstat (limited to 'src/coding.h')
| -rw-r--r-- | src/coding.h | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/src/coding.h b/src/coding.h index 5a921e44950..39f9d62462b 100644 --- a/src/coding.h +++ b/src/coding.h | |||
| @@ -670,27 +670,13 @@ struct coding_system | |||
| 670 | (code) = (s1 << 8) | s2; \ | 670 | (code) = (s1 << 8) | s2; \ |
| 671 | } while (0) | 671 | } while (0) |
| 672 | 672 | ||
| 673 | /* Encode the file name NAME using the specified coding system for | 673 | /* Encode the file name NAME using the specified coding system |
| 674 | file names, if any. If NAME is a unibyte string, return NAME. */ | 674 | for file names, if any. */ |
| 675 | #define ENCODE_FILE(name) \ | 675 | #define ENCODE_FILE(NAME) encode_file_name (NAME) |
| 676 | (! STRING_MULTIBYTE (name) \ | ||
| 677 | ? name \ | ||
| 678 | : (! NILP (Vfile_name_coding_system) \ | ||
| 679 | ? code_convert_string_norecord (name, Vfile_name_coding_system, 1) \ | ||
| 680 | : (! NILP (Vdefault_file_name_coding_system) \ | ||
| 681 | ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \ | ||
| 682 | : name))) | ||
| 683 | |||
| 684 | 676 | ||
| 685 | /* Decode the file name NAME using the specified coding system | 677 | /* Decode the file name NAME using the specified coding system |
| 686 | for file names, if any. */ | 678 | for file names, if any. */ |
| 687 | #define DECODE_FILE(name) \ | 679 | #define DECODE_FILE(NAME) decode_file_name (NAME) |
| 688 | (! NILP (Vfile_name_coding_system) \ | ||
| 689 | ? code_convert_string_norecord (name, Vfile_name_coding_system, 0) \ | ||
| 690 | : (! NILP (Vdefault_file_name_coding_system) \ | ||
| 691 | ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 0) \ | ||
| 692 | : name)) | ||
| 693 | |||
| 694 | 680 | ||
| 695 | /* Encode the string STR using the specified coding system | 681 | /* Encode the string STR using the specified coding system |
| 696 | for system functions, if any. */ | 682 | for system functions, if any. */ |
| @@ -718,6 +704,8 @@ extern Lisp_Object code_convert_string (Lisp_Object, Lisp_Object, | |||
| 718 | Lisp_Object, bool, bool, bool); | 704 | Lisp_Object, bool, bool, bool); |
| 719 | extern Lisp_Object code_convert_string_norecord (Lisp_Object, Lisp_Object, | 705 | extern Lisp_Object code_convert_string_norecord (Lisp_Object, Lisp_Object, |
| 720 | bool); | 706 | bool); |
| 707 | extern Lisp_Object encode_file_name (Lisp_Object); | ||
| 708 | extern Lisp_Object decode_file_name (Lisp_Object); | ||
| 721 | extern Lisp_Object raw_text_coding_system (Lisp_Object); | 709 | extern Lisp_Object raw_text_coding_system (Lisp_Object); |
| 722 | extern Lisp_Object coding_inherit_eol_type (Lisp_Object, Lisp_Object); | 710 | extern Lisp_Object coding_inherit_eol_type (Lisp_Object, Lisp_Object); |
| 723 | extern Lisp_Object complement_process_encoding_system (Lisp_Object); | 711 | extern Lisp_Object complement_process_encoding_system (Lisp_Object); |