Mercurial > emacs
changeset 3835:e3a00a940cf4
(insert-file): Report error if file is directory.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 19 Jun 1993 19:07:19 +0000 |
parents | 1b2144b795aa |
children | 04f1cff889f4 |
files | lisp/files.el |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Sat Jun 19 01:47:40 1993 +0000 +++ b/lisp/files.el Sat Jun 19 19:07:19 1993 +0000 @@ -1550,6 +1550,9 @@ 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))))))