From: Richard M. Stallman Date: Sun, 1 Sep 2002 13:33:08 +0000 (+0000) Subject: (read1): Handle #! by skipping the line. X-Git-Tag: ttn-vms-21-2-B4~13436 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e2518d0288468959a4d36612a3c5a9a270202056;p=emacs.git (read1): Handle #! by skipping the line. --- 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 == '\'')