diff options
| author | Richard M. Stallman <rms@gnu.org> | 1993-06-12 06:54:14 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1993-06-12 06:54:14 +0000 |
| commit | 5ce8bb89cfb5829fe24a09a330ebd2ea367ef885 (patch) | |
| tree | 7f17145f245ec4edb56a86448f2f3b6a51a4265d | |
| parent | c4f4f2d12f957d0c4ccf6f1f29a95c2c2821295a (diff) | |
| download | emacs-5ce8bb89cfb5829fe24a09a330ebd2ea367ef885.tar.gz | |
(make-directory): By default create dir default-dir.
| -rw-r--r-- | lisp/files.el | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el index 96cc510a61c..688b71b5bd4 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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." + (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) |
