if (NILP (handler))
handler = Ffind_file_name_handler (newname);
if (!NILP (handler))
- return RETURN_UNGCPRO (call5 (handler, Qcopy_file, filename, newname,
- ok_if_already_exists, keep_date));
+ RETURN_UNGCPRO (call5 (handler, Qcopy_file, filename, newname,
+ ok_if_already_exists, keep_date));
if (NILP (ok_if_already_exists)
|| XTYPE (ok_if_already_exists) == Lisp_Int)
if (NILP (handler))
handler = Ffind_file_name_handler (newname);
if (!NILP (handler))
- return RETURN_UNGCPRO (call4 (handler, Qrename_file,
- filename, newname, ok_if_already_exists));
+ RETURN_UNGCPRO (call4 (handler, Qrename_file,
+ filename, newname, ok_if_already_exists));
if (NILP (ok_if_already_exists)
|| XTYPE (ok_if_already_exists) == Lisp_Int)
call the corresponding file handler. */
handler = Ffind_file_name_handler (filename);
if (!NILP (handler))
- return RETURN_UNGCPRO (call4 (handler, Qadd_name_to_file, filename,
- newname, ok_if_already_exists));
+ RETURN_UNGCPRO (call4 (handler, Qadd_name_to_file, filename,
+ newname, ok_if_already_exists));
if (NILP (ok_if_already_exists)
|| XTYPE (ok_if_already_exists) == Lisp_Int)
call the corresponding file handler. */
handler = Ffind_file_name_handler (filename);
if (!NILP (handler))
- return RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename,
- linkname, ok_if_already_exists));
+ RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename,
+ linkname, ok_if_already_exists));
if (NILP (ok_if_already_exists)
|| XTYPE (ok_if_already_exists) == Lisp_Int)
if (stat (XSTRING (abspath)->data, &st) < 0)
return Qnil;
+#ifdef MSDOS
+ {
+ int len;
+ char *suffix;
+ if (S_ISREG (st.st_mode)
+ && (len = XSTRING (abspath)->size) >= 5
+ && (stricmp ((suffix = XSTRING (abspath)->data + len-4), ".com") == 0
+ || stricmp (suffix, ".exe") == 0
+ || stricmp (suffix, ".bat") == 0))
+ st.st_mode |= S_IEXEC;
+ }
+#endif /* MSDOS */
+
return make_number (st.st_mode & 07777);
}
is deemed to be a text file. */
{
struct gcpro gcpro1;
- Lisp_Object code = Qnil;
+ Lisp_Object code;
+ code = Qnil;
GCPRO1 (filename);
code = call1 (Qfind_buffer_file_type, filename);
UNGCPRO;