diff options
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/coding.c b/src/coding.c index e285e1c27f3..952fc1408f5 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -6878,6 +6878,13 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS ...) */) | |||
| 6878 | if (nargs < 1 + XINT (target_idx)) | 6878 | if (nargs < 1 + XINT (target_idx)) |
| 6879 | error ("Too few arguments for operation: %s", | 6879 | error ("Too few arguments for operation: %s", |
| 6880 | SDATA (SYMBOL_NAME (operation))); | 6880 | SDATA (SYMBOL_NAME (operation))); |
| 6881 | /* For write-region, if the 6th argument (i.e. VISIT, the 5th | ||
| 6882 | argument to write-region) is string, it must be treated as a | ||
| 6883 | target file name. */ | ||
| 6884 | if (EQ (operation, Qwrite_region) | ||
| 6885 | && nargs > 5 | ||
| 6886 | && STRINGP (args[5])) | ||
| 6887 | target_idx = 4; | ||
| 6881 | target = args[XINT (target_idx) + 1]; | 6888 | target = args[XINT (target_idx) + 1]; |
| 6882 | if (!(STRINGP (target) | 6889 | if (!(STRINGP (target) |
| 6883 | || (EQ (operation, Qopen_network_stream) && INTEGERP (target)))) | 6890 | || (EQ (operation, Qopen_network_stream) && INTEGERP (target)))) |