summaryrefslogtreecommitdiff
path: root/src/lread.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2002-09-01 13:33:08 +0000
committerRichard M. Stallman <rms@gnu.org>2002-09-01 13:33:08 +0000
commite2518d0288468959a4d36612a3c5a9a270202056 (patch)
tree059f81418030bf18016490aaf0e71df57c1b189c /src/lread.c
parent2a8f99fa7a37014cdcab8c63111de98ee5371718 (diff)
downloademacs-e2518d0288468959a4d36612a3c5a9a270202056.tar.gz
(read1): Handle #! by skipping the line.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c8
1 files changed, 8 insertions, 0 deletions
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 == '\'')