dog-slow, but also useless since eventually nil would
have to be returned anyway. */
report_file_error ("Cannot create temporary name for prefix",
- Fcons (prefix, Qnil));
+ list1 (prefix));
/* not reached */
}
}
{
acl = acl_get_file (SDATA (encoded_file), ACL_TYPE_ACCESS);
if (acl == NULL && acl_errno_valid (errno))
- report_file_error ("Getting ACL", Fcons (file, Qnil));
+ report_file_error ("Getting ACL", list1 (file));
}
if (!CopyFile (SDATA (encoded_file),
SDATA (encoded_newname),
{
/* CopyFile doesn't set errno when it fails. By far the most
"popular" reason is that the target is read-only. */
- report_file_errno ("Copying file", Fcons (file, Fcons (newname, Qnil)),
+ report_file_errno ("Copying file", list2 (file, newname),
GetLastError () == 5 ? EACCES : EPERM);
}
/* CopyFile retains the timestamp by default. */
bool fail =
acl_set_file (SDATA (encoded_newname), ACL_TYPE_ACCESS, acl) != 0;
if (fail && acl_errno_valid (errno))
- report_file_error ("Setting ACL", Fcons (newname, Qnil));
+ report_file_error ("Setting ACL", list1 (newname));
acl_free (acl);
}
immediate_quit = 0;
if (ifd < 0)
- report_file_error ("Opening input file", Fcons (file, Qnil));
+ report_file_error ("Opening input file", list1 (file));
record_unwind_protect (close_file_unwind, make_number (ifd));
if (fstat (ifd, &st) != 0)
- report_file_error ("Input file status", Fcons (file, Qnil));
+ report_file_error ("Input file status", list1 (file));
if (!NILP (preserve_extended_attributes))
{
{
conlength = fgetfilecon (ifd, &con);
if (conlength == -1)
- report_file_error ("Doing fgetfilecon", Fcons (file, Qnil));
+ report_file_error ("Doing fgetfilecon", list1 (file));
}
#endif
}
if (out_st.st_mode != 0
&& st.st_dev == out_st.st_dev && st.st_ino == out_st.st_ino)
report_file_errno ("Input and output files are the same",
- Fcons (file, Fcons (newname, Qnil)), 0);
+ list2 (file, newname), 0);
/* We can copy only regular files. */
if (!S_ISREG (st.st_mode))
- report_file_errno ("Non-regular file", Fcons (file, Qnil),
+ report_file_errno ("Non-regular file", list1 (file),
S_ISDIR (st.st_mode) ? EISDIR : EINVAL);
{
new_mask);
}
if (ofd < 0)
- report_file_error ("Opening output file", Fcons (newname, Qnil));
+ report_file_error ("Opening output file", list1 (newname));
record_unwind_protect (close_file_unwind, make_number (ofd));
QUIT;
while ((n = emacs_read (ifd, buf, sizeof buf)) > 0)
if (emacs_write_sig (ofd, buf, n) != n)
- report_file_error ("I/O error", Fcons (newname, Qnil));
+ report_file_error ("I/O error", list1 (newname));
immediate_quit = 0;
#ifndef MSDOS
bool fail = fsetfilecon (ofd, con) != 0;
/* See http://debbugs.gnu.org/11245 for ENOTSUP. */
if (fail && errno != ENOTSUP)
- report_file_error ("Doing fsetfilecon", Fcons (newname, Qnil));
+ report_file_error ("Doing fsetfilecon", list1 (newname));
freecon (con);
}
}
if (emacs_close (ofd) < 0)
- report_file_error ("I/O error", Fcons (newname, Qnil));
+ report_file_error ("I/O error", list1 (newname));
emacs_close (ifd);
encoded_filename = ENCODE_FILE (absname);
if (faccessat (AT_FDCWD, SSDATA (encoded_filename), R_OK, AT_EACCESS) != 0)
- report_file_error (SSDATA (string), Fcons (filename, Qnil));
+ report_file_error (SSDATA (string), list1 (filename));
return Qnil;
}
!= 0);
/* See http://debbugs.gnu.org/11245 for ENOTSUP. */
if (fail && errno != ENOTSUP)
- report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil));
+ report_file_error ("Doing lsetfilecon", list1 (absname));
context_free (parsed_con);
freecon (con);
return fail ? Qnil : Qt;
}
else
- report_file_error ("Doing lgetfilecon", Fcons (absname, Qnil));
+ report_file_error ("Doing lgetfilecon", list1 (absname));
}
#endif
acl = acl_from_text (SSDATA (acl_string));
if (acl == NULL)
{
- report_file_error ("Converting ACL", Fcons (absname, Qnil));
+ report_file_error ("Converting ACL", list1 (absname));
return Qnil;
}
acl)
!= 0);
if (fail && acl_errno_valid (errno))
- report_file_error ("Setting ACL", Fcons (absname, Qnil));
+ report_file_error ("Setting ACL", list1 (absname));
acl_free (acl);
return fail ? Qnil : Qt;
encoded_absname = ENCODE_FILE (absname);
if (chmod (SSDATA (encoded_absname), XINT (mode) & 07777) < 0)
- report_file_error ("Doing chmod", Fcons (absname, Qnil));
+ report_file_error ("Doing chmod", list1 (absname));
return Qnil;
}
if (file_directory_p (SSDATA (encoded_absname)))
return Qnil;
#endif
- report_file_error ("Setting file times", Fcons (absname, Qnil));
+ report_file_error ("Setting file times", list1 (absname));
}
}
{
save_errno = errno;
if (NILP (visit))
- report_file_error ("Opening input file", Fcons (orig_filename, Qnil));
+ report_file_error ("Opening input file", list1 (orig_filename));
mtime = time_error_value (save_errno);
st.st_size = -1;
if (!NILP (Vcoding_system_for_read))
record_unwind_protect (close_file_unwind, make_number (fd));
if (fstat (fd, &st) != 0)
- report_file_error ("Input file status", Fcons (orig_filename, Qnil));
+ report_file_error ("Input file status", list1 (orig_filename));
mtime = get_stat_mtime (&st);
/* This code will need to be changed in order to work on named
int ntail;
if (lseek (fd, - (1024 * 3), SEEK_END) < 0)
report_file_error ("Setting file position",
- Fcons (orig_filename, Qnil));
+ list1 (orig_filename));
ntail = emacs_read (fd, read_buf + nread, 1024 * 3);
nread = ntail < 0 ? ntail : nread + ntail;
}
/* Rewind the file for the actual read done later. */
if (lseek (fd, 0, SEEK_SET) < 0)
report_file_error ("Setting file position",
- Fcons (orig_filename, Qnil));
+ list1 (orig_filename));
}
}
{
if (lseek (fd, beg_offset, SEEK_SET) < 0)
report_file_error ("Setting file position",
- Fcons (orig_filename, Qnil));
+ list1 (orig_filename));
}
immediate_quit = 1;
trial = min (curpos, sizeof read_buf);
if (lseek (fd, curpos - trial, SEEK_SET) < 0)
report_file_error ("Setting file position",
- Fcons (orig_filename, Qnil));
+ list1 (orig_filename));
total_read = nread = 0;
while (total_read < trial)
if (lseek (fd, beg_offset, SEEK_SET) < 0)
report_file_error ("Setting file position",
- Fcons (orig_filename, Qnil));
+ list1 (orig_filename));
inserted = 0; /* Bytes put into CONVERSION_BUFFER so far. */
unprocessed = 0; /* Bytes not processed in previous loop. */
{
if (lseek (fd, beg_offset, SEEK_SET) < 0)
report_file_error ("Setting file position",
- Fcons (orig_filename, Qnil));
+ list1 (orig_filename));
}
/* In the following loop, HOW_MUCH contains the total bytes read so
&& EMACS_NSECS (current_buffer->modtime) == NONEXISTENT_MODTIME_NSECS)
{
/* If visiting nonexistent file, return nil. */
- report_file_errno ("Opening input file", Fcons (orig_filename, Qnil),
+ report_file_errno ("Opening input file", list1 (orig_filename),
save_errno);
}
&& !NILP (Ffboundp (Vselect_safe_coding_system_function)))
/* Confirm that VAL can surely encode the current region. */
val = call5 (Vselect_safe_coding_system_function,
- start, end, Fcons (Qt, Fcons (val, Qnil)),
+ start, end, list2 (Qt, val),
Qnil, filename);
}
else
record_unwind_protect (build_annotations_unwind,
Vwrite_region_annotation_buffers);
- Vwrite_region_annotation_buffers = Fcons (Fcurrent_buffer (), Qnil);
+ Vwrite_region_annotation_buffers = list1 (Fcurrent_buffer ());
count1 = SPECPDL_INDEX ();
given_buffer = current_buffer;
if (!auto_saving) unlock_file (lockname);
#endif /* CLASH_DETECTION */
UNGCPRO;
- report_file_errno ("Opening output file", Fcons (filename, Qnil),
+ report_file_errno ("Opening output file", list1 (filename),
open_errno);
}
if (!auto_saving) unlock_file (lockname);
#endif /* CLASH_DETECTION */
UNGCPRO;
- report_file_errno ("Lseek error", Fcons (filename, Qnil),
+ report_file_errno ("Lseek error", list1 (filename),
lseek_errno);
}
}