aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa2002-08-08 12:34:27 +0000
committerKenichi Handa2002-08-08 12:34:27 +0000
commit7f787cfd76c86511c86724ab6276c66a054f5b9d (patch)
tree1c8429091eec800c3c0219fede9e992d4e1f369e /src/coding.c
parentb12a80582de5415d05a0fc5530f538b42e827c80 (diff)
downloademacs-7f787cfd76c86511c86724ab6276c66a054f5b9d.tar.gz
emacs-7f787cfd76c86511c86724ab6276c66a054f5b9d.zip
(Ffind_operation_coding_system): For write-region, if
VISIT is a filename, make it the target.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c7
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))))