Commit 5ce8bb89 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(make-directory): By default create dir default-dir.

parent c4f4f2d1
......@@ -1585,8 +1585,17 @@ or multiple mail buffers, etc."
(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."
(list (read-file-name "Make directory: " default-directory default-directory
nil nil)
(let ((handler (find-file-name-handler dir)))
(if handler
(funcall handler 'make-directory dir parents)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment