aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/coding.h')
-rw-r--r--src/coding.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/coding.h b/src/coding.h
index 0472bec99de..5a921e44950 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -670,14 +670,16 @@ 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 673/* Encode the file name NAME using the specified coding system for
674 for file names, if any. */ 674 file names, if any. If NAME is a unibyte string, return NAME. */
675#define ENCODE_FILE(name) \ 675#define ENCODE_FILE(name) \
676 (! NILP (Vfile_name_coding_system) \ 676 (! STRING_MULTIBYTE (name) \
677 ? code_convert_string_norecord (name, Vfile_name_coding_system, 1) \ 677 ? name \
678 : (! NILP (Vdefault_file_name_coding_system) \ 678 : (! NILP (Vfile_name_coding_system) \
679 ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \ 679 ? code_convert_string_norecord (name, Vfile_name_coding_system, 1) \
680 : name)) 680 : (! NILP (Vdefault_file_name_coding_system) \
681 ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \
682 : name)))
681 683
682 684
683/* Decode the file name NAME using the specified coding system 685/* Decode the file name NAME using the specified coding system