diff options
author | Jim Blandy <jimb@redhat.com> | 1993-06-10 11:39:44 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1993-06-10 11:39:44 +0000 |
commit | 92b281339af833561dad68289cd2209a379b24da (patch) | |
tree | 55a1a78786f1a12533565f4dc42125b5bc91c162 /lisp/ange-ftp.el | |
parent | 17df4d9dae5415bdff13cf2f1f3f8e4d35d94614 (diff) | |
download | emacs-92b281339af833561dad68289cd2209a379b24da.tar.gz |
* ange-ftp.el (ange-ftp-make-directory): Take second optional
argument parents, like the original. Implement it.
Diffstat (limited to 'lisp/ange-ftp.el')
-rw-r--r-- | lisp/ange-ftp.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el index 9b40a747b3a..c895ce9fa26 100644 --- a/lisp/ange-ftp.el +++ b/lisp/ange-ftp.el @@ -856,7 +856,7 @@ SIZE, if supplied, should be a prime number." ;;;; Internal variables. ;;;; ------------------------------------------------------------ -(defconst ange-ftp-version "$Revision: 1.24 $") +(defconst ange-ftp-version "$Revision: 1.25 $") (defvar ange-ftp-data-buffer-name " *ftp data*" "Buffer name to hold directory listing data received from ftp process.") @@ -3546,8 +3546,12 @@ system TYPE.") (ange-ftp-del-hash-entry dir ange-ftp-files-hashtable) (ange-ftp-get-files dir t)))) -(defun ange-ftp-make-directory (dir) +(defun ange-ftp-make-directory (dir &optional parents) (interactive (list (expand-file-name (read-file-name "Make directory: ")))) + (if parents + (let ((parent (file-name-directory (directory-file-name dir)))) + (or (file-exists-p parent) + (ange-ftp-make-directory parent parents)))) (if (file-exists-p dir) (error "Cannot make directory %s: file already exists" dir) (let ((parsed (ange-ftp-ftp-name dir))) |