summaryrefslogtreecommitdiff
path: root/src/dired.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-09-02 01:19:53 +0000
committerRichard M. Stallman <rms@gnu.org>1995-09-02 01:19:53 +0000
commit249f3eb7ba743ae23f822badb2432f96bbeb8da5 (patch)
tree97c54fd6a6fa08251d418a4bde0b3d00c4adf567 /src/dired.c
parent08b57c47c57c84748ad9ee47a4b2b101d1368ef5 (diff)
downloademacs-249f3eb7ba743ae23f822badb2432f96bbeb8da5.tar.gz
(Ffile_name_all_completions, Ffile_name_completion):
Look for handler for FILE as well as for DIRNAME.
Diffstat (limited to 'src/dired.c')
-rw-r--r--src/dired.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/dired.c b/src/dired.c
index 834729a0319..de93a67adc4 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -236,12 +236,18 @@ Returns nil if DIR contains no name starting with FILE.")
{
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);
}
@@ -254,12 +260,18 @@ These are all file names in directory DIR which begin with FILE.")
{
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);
}