ok to indicate a comment in an mg startup file with the '#' char?

I can't see how this will break anybodys current startup files...

-lum

Index: extend.c
===================================================================
RCS file: /cvs/src/usr.bin/mg/extend.c,v
retrieving revision 1.54
diff -u -p -u -p -r1.54 extend.c
--- extend.c    20 Mar 2014 07:47:29 -0000      1.54
+++ extend.c    2 Apr 2014 18:35:21 -0000
@@ -730,8 +730,9 @@ excline(char *line)
        f = 0;
        n = 1;
        funcp = skipwhite(line);
-       if (*funcp == '\0')
-               return (TRUE);  /* No error on blank lines */
+       /* No error on blank lines and skip comment lines.  */
+       if (*funcp == '\0' || *funcp == '#')
+               return (TRUE);
        line = parsetoken(funcp);
        if (*line != '\0') {
                *line++ = '\0';
Index: mg.1
===================================================================
RCS file: /cvs/src/usr.bin/mg/mg.1,v
retrieving revision 1.87
diff -u -p -u -p -r1.87 mg.1
--- mg.1        27 Mar 2014 07:30:25 -0000      1.87
+++ mg.1        2 Apr 2014 18:35:21 -0000
@@ -1033,6 +1033,10 @@ set-default-mode fill
 set-fill-column 72
 auto-execute *.c c-mode
 .Ed
+.Pp
+Comments can be added to the startup files by placing
+.Dq #
+as the first character of a line.
 .Sh FILES
 .Bl -tag -width /usr/share/doc/mg/tutorial -compact
 .It Pa ~/.mg

Reply via email to