On Tue, Feb 14, 2006 at 09:10:09PM +0100, Viktor Griph wrote:
> Right now
> Style * Colorset 1 #, HilightColorset 2
> is the same as
> Style * Colorset 1, HilightColorset 2
> i.e. the # is simply ignored, which is somewhat correct according to the 
> man page.

In-line comments were never meant to work anyway.

> However most users familiar with shell-scripts and perl scripts 
> would think that the end of the first line is a comment, also the fact 
> that fvwm does not warn about ignoring unused arguments to style parts 
> makes it really hard to spot such a misstake in a config file. (I actually 
> didn't know that fvwm-comments had to start on the first character of a 
> line until I looked it up in the man page right now. (and the emacs mode 
> does not deal with that either ;)))

> However, it's not entierly sure that commetns only start on the beginning 
> of a line, but they can also be before any command in stacked commands.

No, not in the way you may think.  In that case they are taken as
part of the command and the '#' eventually becomes the first
character of a command line and is interpreted as a comment.  They
*do not* comment out the rest of the line in which they occured.

> This in all can confuse some users (me included) alot. I think it would be 
> good to think over the comment syntax, and maybe extend it to allow end of 
> line comments as well. Since this would beak config file compability (if 
> someone actually needs a '#' somewhere in the config file that is not on 
> the beginning of line (s)he would have to escape it) it will have to 
> wait until after 2.6 is realeased.

I don't think that's a good idea at all.  People who think that
fvwm syntax is shell syntax are going to have a problem anyway.
Fvwm's command line parser is undoubtedly strange, and I always
had a vague plan to clean up parsing and command syntax radically
in 3.0.  It would be nice to have a real parser, maybe leveraged
from zsh.  Worrying just about comment syntax won't take us
anywhere.

> Thoughts?
 
> One thing that probably can be done now, without to mush effort would be 
> to add a warning for unconsumed non-whitespace characters following style 
> options. It would also trap missing commas.

Yes, that wouldn't hurt.

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [EMAIL PROTECTED]

Attachment: signature.asc
Description: Digital signature

Reply via email to