Commit 7f787cfd authored by Kenichi Handa's avatar Kenichi Handa

(Ffind_operation_coding_system): For write-region, if

VISIT is a filename, make it the target.
parent b12a8058
......@@ -6878,6 +6878,13 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS ...) */)
if (nargs < 1 + XINT (target_idx))
error ("Too few arguments for operation: %s",
SDATA (SYMBOL_NAME (operation)));
/* For write-region, if the 6th argument (i.e. VISIT, the 5th
argument to write-region) is string, it must be treated as a
target file name. */
if (EQ (operation, Qwrite_region)
&& nargs > 5
&& STRINGP (args[5]))
target_idx = 4;
target = args[XINT (target_idx) + 1];
if (!(STRINGP (target)
|| (EQ (operation, Qopen_network_stream) && INTEGERP (target))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment