report_file_error ("Setting current directory",
BVAR (current_buffer, directory));
- /* Remove "/:" from dir. */
- if (! NILP (Fstring_match (build_string ("^/:"), dir, Qnil)))
- dir = Fsubstring (dir, make_number (2), Qnil);
+ /* Remove "/:" from DIR and encode it. */
+ dir = ENCODE_FILE (remove_slash_colon (dir));
- if (STRING_MULTIBYTE (dir))
- dir = ENCODE_FILE (dir);
if (! file_accessible_directory_p (dir))
report_file_error ("Setting current directory",
BVAR (current_buffer, directory));
infile = build_string (NULL_DEVICE);
GCPRO1 (infile);
- encoded_infile = STRING_MULTIBYTE (infile) ? ENCODE_FILE (infile) : infile;
+ encoded_infile = ENCODE_FILE (infile);
filefd = emacs_open (SSDATA (encoded_infile), O_RDONLY, 0);
if (filefd < 0)
GCPRO4 (buffer, current_dir, error_file, output_file);
- if (STRINGP (error_file) && STRING_MULTIBYTE (error_file))
+ if (STRINGP (error_file))
error_file = ENCODE_FILE (error_file);
- if (STRINGP (output_file) && STRING_MULTIBYTE (output_file))
+ if (STRINGP (output_file))
output_file = ENCODE_FILE (output_file);
UNGCPRO;
}
report_file_error ("Searching for program", args[0]);
}
- /* If program file name starts with /: for quoting a magic name,
- discard that. */
- if (SBYTES (path) > 2 && SREF (path, 0) == '/'
- && SREF (path, 1) == ':')
- path = Fsubstring (path, make_number (2), Qnil);
+ /* Remove "/:" from PATH. */
+ path = remove_slash_colon (path);
SAFE_NALLOCA (new_argv, 1, nargs < 4 ? 2 : nargs - 2);
}
else
new_argv[1] = 0;
- if (STRING_MULTIBYTE (path))
- path = ENCODE_FILE (path);
+ path = ENCODE_FILE (path);
new_argv[0] = SSDATA (path);
UNGCPRO;
}
specbind (intern ("coding-system-for-write"), val);
/* POSIX lets mk[s]temp use "."; don't invoke jka-compr if we
happen to get a ".Z" suffix. */
- specbind (intern ("file-name-handler-alist"), Qnil);
+ specbind (Qfile_name_handler_alist, Qnil);
write_region (start, end, filename_string, Qnil, Qlambda, Qnil, Qnil, fd);
unbind_to (count1, Qnil);
#ifdef HAVE_NS
const char *path_exec = ns_exec_path ();
#endif
+ /* Running uninstalled, so default to tem rather than PATH_EXEC. */
Vexec_path = decode_env_path ("EMACSPATH",
#ifdef HAVE_NS
path_exec ? path_exec :
#endif
- PATH_EXEC, 0);
- Vexec_path = Fcons (tem, Vexec_path);
+ SSDATA (tem), 0);
Vexec_path = nconc2 (decode_env_path ("PATH", "", 0), Vexec_path);
}