diff options
| author | Richard M. Stallman | 2002-09-01 13:33:08 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-09-01 13:33:08 +0000 |
| commit | e2518d0288468959a4d36612a3c5a9a270202056 (patch) | |
| tree | 059f81418030bf18016490aaf0e71df57c1b189c /src | |
| parent | 2a8f99fa7a37014cdcab8c63111de98ee5371718 (diff) | |
| download | emacs-e2518d0288468959a4d36612a3c5a9a270202056.tar.gz emacs-e2518d0288468959a4d36612a3c5a9a270202056.zip | |
(read1): Handle #! by skipping the line.
Diffstat (limited to 'src')
| -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) | |||
| 2098 | 2098 | ||
| 2099 | goto retry; | 2099 | goto retry; |
| 2100 | } | 2100 | } |
| 2101 | if (c == '!') | ||
| 2102 | { | ||
| 2103 | /* #! appears at the beginning of an executable file. | ||
| 2104 | Skip the first line. */ | ||
| 2105 | while (c != '\n') | ||
| 2106 | c = READCHAR; | ||
| 2107 | goto retry; | ||
| 2108 | } | ||
| 2101 | if (c == '$') | 2109 | if (c == '$') |
| 2102 | return Vload_file_name; | 2110 | return Vload_file_name; |
| 2103 | if (c == '\'') | 2111 | if (c == '\'') |