aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1995-09-02 01:19:53 +0000
committerRichard M. Stallman1995-09-02 01:19:53 +0000
commit8436e23177b5fe7f705ed88e6e334af64585cab1 (patch)
treea3d153d1120d1b228b1e8cb84a8d18d2baa0e3c1 /src
parentae4788a82befc4d0903e349e0df2f8038e8b6ac5 (diff)
downloademacs-8436e23177b5fe7f705ed88e6e334af64585cab1.tar.gz
emacs-8436e23177b5fe7f705ed88e6e334af64585cab1.zip
(Ffile_name_all_completions, Ffile_name_completion):
Look for handler for FILE as well as for DIRNAME.
Diffstat (limited to 'src')
-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.")
236{ 236{
237 Lisp_Object handler; 237 Lisp_Object handler;
238 238
239 /* If the file name has special constructs in it, 239 /* If the directory name has special constructs in it,
240 call the corresponding file handler. */ 240 call the corresponding file handler. */
241 handler = Ffind_file_name_handler (dirname, Qfile_name_completion); 241 handler = Ffind_file_name_handler (dirname, Qfile_name_completion);
242 if (!NILP (handler)) 242 if (!NILP (handler))
243 return call3 (handler, Qfile_name_completion, file, dirname); 243 return call3 (handler, Qfile_name_completion, file, dirname);
244 244
245 /* If the file name has special constructs in it,
246 call the corresponding file handler. */
247 handler = Ffind_file_name_handler (file, Qfile_name_completion);
248 if (!NILP (handler))
249 return call3 (handler, Qfile_name_completion, file, dirname);
250
245 return file_name_completion (file, dirname, 0, 0); 251 return file_name_completion (file, dirname, 0, 0);
246} 252}
247 253
@@ -254,12 +260,18 @@ These are all file names in directory DIR which begin with FILE.")
254{ 260{
255 Lisp_Object handler; 261 Lisp_Object handler;
256 262
257 /* If the file name has special constructs in it, 263 /* If the directory name has special constructs in it,
258 call the corresponding file handler. */ 264 call the corresponding file handler. */
259 handler = Ffind_file_name_handler (dirname, Qfile_name_all_completions); 265 handler = Ffind_file_name_handler (dirname, Qfile_name_all_completions);
260 if (!NILP (handler)) 266 if (!NILP (handler))
261 return call3 (handler, Qfile_name_all_completions, file, dirname); 267 return call3 (handler, Qfile_name_all_completions, file, dirname);
262 268
269 /* If the file name has special constructs in it,
270 call the corresponding file handler. */
271 handler = Ffind_file_name_handler (file, Qfile_name_all_completions);
272 if (!NILP (handler))
273 return call3 (handler, Qfile_name_all_completions, file, dirname);
274
263 return file_name_completion (file, dirname, 1, 0); 275 return file_name_completion (file, dirname, 1, 0);
264} 276}
265 277