diff options
| author | Richard M. Stallman | 1993-06-12 06:54:14 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-06-12 06:54:14 +0000 |
| commit | 5ce8bb89cfb5829fe24a09a330ebd2ea367ef885 (patch) | |
| tree | 7f17145f245ec4edb56a86448f2f3b6a51a4265d | |
| parent | c4f4f2d12f957d0c4ccf6f1f29a95c2c2821295a (diff) | |
| download | emacs-5ce8bb89cfb5829fe24a09a330ebd2ea367ef885.tar.gz emacs-5ce8bb89cfb5829fe24a09a330ebd2ea367ef885.zip | |
(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." | |||
| 1585 | (set-buffer-modified-p (buffer-modified-p)))) ; force mode line update | 1585 | (set-buffer-modified-p (buffer-modified-p)))) ; force mode line update |
| 1586 | 1586 | ||
| 1587 | (defun make-directory (dir &optional parents) | 1587 | (defun make-directory (dir &optional parents) |
| 1588 | "Create the directory DIR and any nonexistent parent dirs." | 1588 | "Create the directory DIR and any nonexistent parent dirs. |
| 1589 | (interactive "FMake directory: \nP") | 1589 | Interactively, the default choice of directory to create |
| 1590 | is the current default directory for file names. | ||
| 1591 | That is useful when you have visited a file in a nonexistint directory. | ||
| 1592 | |||
| 1593 | Noninteractively, the second (optional) argument PARENTS says whether | ||
| 1594 | to create parent directories if they don't exist." | ||
| 1595 | (interactive | ||
| 1596 | (list (read-file-name "Make directory: " default-directory default-directory | ||
| 1597 | nil nil) | ||
| 1598 | t)) | ||
| 1590 | (let ((handler (find-file-name-handler dir))) | 1599 | (let ((handler (find-file-name-handler dir))) |
| 1591 | (if handler | 1600 | (if handler |
| 1592 | (funcall handler 'make-directory dir parents) | 1601 | (funcall handler 'make-directory dir parents) |