# HG changeset patch
# User Richard M. Stallman <rms@gnu.org>
# Date 740516839 0
# Node ID e3a00a940cf48ef2854481daf4d004b4a4b217dc
# Parent  1b2144b795aa9b96866e5f3fda0c56bf999bc0bc
(insert-file): Report error if file is directory.

diff -r 1b2144b795aa -r e3a00a940cf4 lisp/files.el
--- 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))))))