diff options
author | Richard M. Stallman <rms@gnu.org> | 2002-09-01 13:33:08 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2002-09-01 13:33:08 +0000 |
commit | e2518d0288468959a4d36612a3c5a9a270202056 (patch) | |
tree | 059f81418030bf18016490aaf0e71df57c1b189c /src/lread.c | |
parent | 2a8f99fa7a37014cdcab8c63111de98ee5371718 (diff) | |
download | emacs-e2518d0288468959a4d36612a3c5a9a270202056.tar.gz |
(read1): Handle #! by skipping the line.
Diffstat (limited to 'src/lread.c')
-rw-r--r-- | src/lread.c | 8 |
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 == '\'') |