]> git.eshelyaron.com Git - emacs.git/commitdiff
(read1): Handle #! by skipping the line.
authorRichard M. Stallman <rms@gnu.org>
Sun, 1 Sep 2002 13:33:08 +0000 (13:33 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 1 Sep 2002 13:33:08 +0000 (13:33 +0000)
src/lread.c

index f273ce60ec57fd87037eb4e881b8900207e6ab7e..fa3b5cdd4ec451ac5bff79b87960bb22e03e208e 100644 (file)
@@ -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 == '\'')