On Fri, 02 Dec 2011 15:47:06 +0100 Marco Marongiu <brontoli...@gmail.com> wrote:
MM> I confirm the following: MM> My platform: Ubuntu 10.04.3 LTS (as appears in motd) MM> My Emacs: MM> This is GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.20.1) MM> of 2011-03-04 on palmer, modified by Debian ... MM> I confirm it: when I load a file, it writes: MM> Error during redisplay: (void-variable font-lock-constant-name-face) [2 MM> times] I'll debug this on a 10.04 machine. I'll keep the discussion in the cfengine mailing lists because the mode we're discussing is specifically hosted by cfengine. I hope that's OK with the moderators. You can send me bug reports directly if there's confidential information. >> I also tested highlighting and indentation. It works fine. MM> It doesn't 100% here, unless it is supposed to be with just a few MM> keywords and classes highlighted, plus quoted strings (see second MM> attachment) Well, the highlighting depends on your settings too. I'm applying font-lock faces but you could have them empty or undistinguished. I think the default that comes with Emacs is pretty plain, and only later versions have color-themes so it's easy to customize all the colors at once. Looking at `cfengine3-font-lock-keywords': - functions get `font-lock-builtin-face' - variables get `font-lock-variable-name-face' - variable types, e.g. "slist" get `font-lock-type-face' ...among others. You should have a nice multicolor salad :) MM> Regarding indentation, is it a feature that you can't indent attributes MM> (e.g.: comment =>) more than the promised object, or it is a bug? In general I tried to keep the cfengine3 indenting very minimal, you'll notice that all sections are level 1 and all selectors are level 2 (level 0 being the bundle). All commands are level 3. I think that's nice because whether or not you have class selectors, the commands always line up. So, inside a bundle, with indentation of 2 spaces: section: # implied any:: dosomething(); selector:: dosomething(); So keep that in mind... some of the indentation makes sense in that context. For the attribute 0 indent, it's a feature but I can change it to give an optional extra indent to continued lines. I was trying to make the appearance uniform and consistent but I see how it can be useful to indent attributes. MM> Other things were false positives, and they took time to reproduce: the MM> other indentation problem was actually due to Emacs guessing wrong, and MM> applying cfengine mode instead of cfengine3. MM> I overlooked it at first because, well, it was a cfengine file and it MM> was the cfengine mode. When I finished to consider the difficult MM> possible sources of the problem, I turned to the simpler ones, and MM> there: "damn! shouldn't be written CFEngine3 down there?!". Oh, I've done that many times :) Ted _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine