changeset 3611:2250b4880589

* ange-ftp.el (ange-ftp-make-directory): Take second optional argument parents, like the original. Implement it.
author Jim Blandy <jimb@redhat.com>
date Thu, 10 Jun 1993 11:39:44 +0000
parents b0c94b723e6a
children d701e7af5ba5
files lisp/ange-ftp.el
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ange-ftp.el	Thu Jun 10 10:40:16 1993 +0000
+++ b/lisp/ange-ftp.el	Thu Jun 10 11:39:44 1993 +0000
@@ -856,7 +856,7 @@
 ;;;; 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 @@
 	(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)))