diff lisp/files.el @ 3672:3eaec128c91e

(make-directory): By default create dir default-dir.
author Richard M. Stallman <rms@gnu.org>
date Sat, 12 Jun 1993 06:54:14 +0000
parents 7b357cbaae8b
children 09e961c82be8
line wrap: on
line diff
--- a/lisp/files.el	Sat Jun 12 02:18:02 1993 +0000
+++ b/lisp/files.el	Sat Jun 12 06:54:14 1993 +0000
@@ -1585,8 +1585,17 @@
     (set-buffer-modified-p (buffer-modified-p)))) ; force mode line update
 
 (defun make-directory (dir &optional parents)
-  "Create the directory DIR and any nonexistent parent dirs."
-  (interactive "FMake directory: \nP")
+  "Create the directory DIR and any nonexistent parent dirs.
+Interactively, the default choice of directory to create
+is the current default directory for file names.
+That is useful when you have visited a file in a nonexistint directory.
+
+Noninteractively, the second (optional) argument PARENTS says whether
+to create parent directories if they don't exist."
+  (interactive
+   (list (read-file-name "Make directory: " default-directory default-directory
+			 nil nil)
+	 t))
   (let ((handler (find-file-name-handler dir)))
     (if handler
 	(funcall handler 'make-directory dir parents)