diff options
| author | Richard M. Stallman <rms@gnu.org> | 1993-06-19 19:07:19 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1993-06-19 19:07:19 +0000 |
| commit | 3be6243a7dd313b0f3eb1fdd11f7ef6d8152853a (patch) | |
| tree | bd94bedaebb573af26d9714b7e65e6a2531f7359 /lisp/files.el | |
| parent | fc25d15df03a3ca3e265fc18a2bf58a27a6cb09e (diff) | |
| download | emacs-3be6243a7dd313b0f3eb1fdd11f7ef6d8152853a.tar.gz | |
(insert-file): Report error if file is directory.
Diffstat (limited to 'lisp/files.el')
| -rw-r--r-- | lisp/files.el | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/files.el b/lisp/files.el index dc07a02473a..3782a794727 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1550,6 +1550,9 @@ This function is meant for the user to run interactively. Don't call it from programs! Use `insert-file-contents' instead. \(Its calling sequence is different; see its documentation)." (interactive "fInsert file: ") + (if (file-directory-p filename) + (signal 'file-error (list "Opening input file" "file is a directory" + filename))) (let ((tem (insert-file-contents filename))) (push-mark (+ (point) (car (cdr tem)))))) |
