diff src/lread.c @ 47184:04a4d5eda995

(read1): Handle #! by skipping the line.
author Richard M. Stallman <rms@gnu.org>
date Sun, 01 Sep 2002 13:33:08 +0000
parents 3bd4234e0844
children 8d4ba9addc8e
line wrap: on
line diff
--- a/src/lread.c	Sun Sep 01 13:30:19 2002 +0000
+++ b/src/lread.c	Sun Sep 01 13:33:08 2002 +0000
@@ -2098,6 +2098,14 @@
 
 	  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 == '\'')