diff options
| author | Paul Eggert | 2022-12-17 12:15:30 -0800 |
|---|---|---|
| committer | Paul Eggert | 2022-12-17 14:24:16 -0800 |
| commit | 8a9579ca29df951ace35125873949e905fd1af2b (patch) | |
| tree | c0742b4d88da2c78a24dc4be844c9ec436d96520 /src | |
| parent | 627e7e0243d6df73b7cc93fb7a106a61c944b3bf (diff) | |
| download | emacs-8a9579ca29df951ace35125873949e905fd1af2b.tar.gz emacs-8a9579ca29df951ace35125873949e905fd1af2b.zip | |
Use make-directory handlers uniformly
Formerly, the code supported both make-directory and
make-directory-internal handlers. This led to confusion and meant than
in a few cases (nnmaildir, ido) remote directories could not be used in
some cases. Fix this by using only make-directory handlers.
Perhaps there used to be a reason for why there were both
make-directory and make-directory-internal handlers, but whatever that
reason was, it seems to have vanished even before now.
There is no longer any need for make-directory-internal handlers, as
the few remaining callers that use make-directory-internal do so only
when there are no handlers. However, this change keeps the existing
make-directory-internal handlers for now, in case this code is ever
used in older Emacs versions that still call those handlers.
* lisp/gnus/nnmaildir.el (nnmaildir--mkdir):
* lisp/ido.el (ido-file-internal):
* lisp/net/tramp-smb.el (tramp-smb-handle-make-directory):
Use make-directory, not make-directory-internal.
* lisp/net/tramp-smb.el (tramp-smb-handle-make-directory-internal):
Now obsolete.
* src/fileio.c (Fmake_directory_internal): Do not look for or
use a make-directory-internal handler.
* test/lisp/files-tests.el:
(files-tests-file-name-non-special-make-directory-internal):
Remove, as this test incorrectly assumes that make-directory-internal
must support handlers.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/fileio.c b/src/fileio.c index 92335b639cd..835c42cc0a4 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -2427,16 +2427,11 @@ DEFUN ("make-directory-internal", Fmake_directory_internal, | |||
| 2427 | (Lisp_Object directory) | 2427 | (Lisp_Object directory) |
| 2428 | { | 2428 | { |
| 2429 | const char *dir; | 2429 | const char *dir; |
| 2430 | Lisp_Object handler; | ||
| 2431 | Lisp_Object encoded_dir; | 2430 | Lisp_Object encoded_dir; |
| 2432 | 2431 | ||
| 2433 | CHECK_STRING (directory); | 2432 | CHECK_STRING (directory); |
| 2434 | directory = Fexpand_file_name (directory, Qnil); | 2433 | directory = Fexpand_file_name (directory, Qnil); |
| 2435 | 2434 | ||
| 2436 | handler = Ffind_file_name_handler (directory, Qmake_directory_internal); | ||
| 2437 | if (!NILP (handler)) | ||
| 2438 | return call2 (handler, Qmake_directory_internal, directory); | ||
| 2439 | |||
| 2440 | encoded_dir = ENCODE_FILE (directory); | 2435 | encoded_dir = ENCODE_FILE (directory); |
| 2441 | 2436 | ||
| 2442 | dir = SSDATA (encoded_dir); | 2437 | dir = SSDATA (encoded_dir); |