summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-02-03 05:56:36 +0000
committerRichard M. Stallman <rms@gnu.org>1994-02-03 05:56:36 +0000
commitb56ad927c40bc61d53b07ec343a75f202d432dbf (patch)
tree27477b97e28cac04e6e710e86489301b114607c6
parent990a74216b4a7ec2f8cc06ba0118b5bebaa26137 (diff)
downloademacs-b56ad927c40bc61d53b07ec343a75f202d432dbf.tar.gz
emacs-b56ad927c40bc61d53b07ec343a75f202d432dbf.tar.bz2
emacs-b56ad927c40bc61d53b07ec343a75f202d432dbf.zip
(Fwrite_region): If FILENAME has no handler, see if VISIT has one.
-rw-r--r--src/fileio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c
index b1066995ac5..b70f7121e8f 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2803,6 +2803,9 @@ to the file, instead of any buffer contents, and END is ignored.")
/* If the file name has special constructs in it,
call the corresponding file handler. */
handler = Ffind_file_name_handler (filename);
+ /* If FILENAME has no handler, see if VISIT has one. */
+ if (NILP (handler) && XTYPE (visit) == Lisp_String)
+ handler = Ffind_file_name_handler (visit);
if (!NILP (handler))
{