changeset 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 865837df3fe7
children 2ff45b08a155
files src/lread.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
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 == '\'')