{
Lisp_Object handler;
- /* If the file name has special constructs in it,
+ /* If the directory name has special constructs in it,
call the corresponding file handler. */
handler = Ffind_file_name_handler (dirname, Qfile_name_completion);
if (!NILP (handler))
return call3 (handler, Qfile_name_completion, file, dirname);
+ /* If the file name has special constructs in it,
+ call the corresponding file handler. */
+ handler = Ffind_file_name_handler (file, Qfile_name_completion);
+ if (!NILP (handler))
+ return call3 (handler, Qfile_name_completion, file, dirname);
+
return file_name_completion (file, dirname, 0, 0);
}
{
Lisp_Object handler;
- /* If the file name has special constructs in it,
+ /* If the directory name has special constructs in it,
call the corresponding file handler. */
handler = Ffind_file_name_handler (dirname, Qfile_name_all_completions);
if (!NILP (handler))
return call3 (handler, Qfile_name_all_completions, file, dirname);
+ /* If the file name has special constructs in it,
+ call the corresponding file handler. */
+ handler = Ffind_file_name_handler (file, Qfile_name_all_completions);
+ if (!NILP (handler))
+ return call3 (handler, Qfile_name_all_completions, file, dirname);
+
return file_name_completion (file, dirname, 1, 0);
}