From 8a9579ca29df951ace35125873949e905fd1af2b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 17 Dec 2022 12:15:30 -0800 Subject: 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. --- lisp/net/tramp-smb.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp/net') diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index c720b33b5f2..24fff9bb495 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -1186,12 +1186,13 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." (make-directory ldir parents)) ;; Just do it. (when (file-directory-p ldir) - (make-directory-internal dir)) + (make-directory dir)) (unless (file-directory-p dir) (tramp-error v 'file-error "Couldn't make directory %s" dir))))) (defun tramp-smb-handle-make-directory-internal (directory) "Like `make-directory-internal' for Tramp files." + (declare (obsolete nil "29.1")) (setq directory (directory-file-name (expand-file-name directory))) (unless (file-name-absolute-p directory) (setq directory (expand-file-name directory default-directory))) -- cgit v1.2.3