From e2518d0288468959a4d36612a3c5a9a270202056 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 1 Sep 2002 13:33:08 +0000 Subject: [PATCH] (read1): Handle #! by skipping the line. --- src/lread.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lread.c b/src/lread.c index f273ce60ec5..fa3b5cdd4ec 100644 --- a/src/lread.c +++ b/src/lread.c @@ -2098,6 +2098,14 @@ read1 (readcharfun, pch, first_in_list) goto retry; } + if (c == '!') + { + /* #! appears at the beginning of an executable file. + Skip the first line. */ + while (c != '\n') + c = READCHAR; + goto retry; + } if (c == '$') return Vload_file_name; if (c == '\'') -- 2.39.5