On Fri, 02 Dec 2011 10:38:14 -0500 Ted Zlatanov <t...@lifelogs.com> wrote:
TZ> For the attribute 0 indent, it's a feature but I can change it to give TZ> an optional extra indent to continued lines. I was trying to make the TZ> appearance uniform and consistent but I see how it can be useful to TZ> indent attributes. I've added a new variable, `cfengine3-parameters-indent' which can be customized by doing `M-x customize-variable cfengine3-parameters-indent' There are three things you can control: 1) the anchor point: either at beginning of line or at the promise. The offset will thus be applied either absolutely, from the beginning of the line, or relative to the current promise's indentation 2) the indentation point: we indent either the parameter name or the arrow 3) the indentation offset The default is to anchor at promise, indent parameter name, and offset 0: #+begin_src cfengine3 bundle agent rcfiles { files: any:: "/tmp/netrc" comment => "my netrc", perms => mog("600", "tzz", "tzz"); } #+end_src Here we anchor at beginning of line, indent arrow, and offset 10: #+begin_src cfengine3 bundle agent rcfiles { files: any:: "/tmp/netrc" comment => "my netrc", perms => mog("600", "tzz", "tzz"); } #+end_src Some, including cfengine_stdlib.cf, like to anchor at promise, indent arrow, and offset 16 or so: #+begin_src cfengine3 bundle agent rcfiles { files: any:: "/tmp/netrc" comment => "my netrc", perms => mog("600", "tzz", "tzz"); } #+end_src Please try it and let me know how you like it. I may change the default if enough people like another style. On Fri, 02 Dec 2011 11:04:55 -0500 Ted Zlatanov <t...@lifelogs.com> wrote: TZ> On Fri, 02 Dec 2011 16:48:38 +0100 Mikhail Gusarov <mikhail.gusa...@cfengine.com> wrote: MG> Maybe it's possible to rename cfengine-mode to cfengine2-mode and MG> cfengine-auto-mode to cfengine-mode? It should not break anything, as MG> long as cf2 detection works reliably. TZ> I'll propose it to the Emacs maintainers. The renaming is approved; eventually `cfengine3-mode' will be `cfengine-mode' as CFEngine 2 is old. The attached changed cfengine.el will (this summary was also posted on emacs-devel): 1) rename `cfengine-mode' to `cfengine2-mode' and defalias 'cfengine-mode to 'cfengine-auto-mode. Provide 'cfengine2. 2) rename all the "cfengine-*" variables used only by `cfengine2-mode' to "cfengine2-*" 3) adjust the commentary to match 4) give a version and set it to 1.1 for this release 5) use "CFEngine" consistently 6) add `cfengine3-mode-verbose' to control some debugging info 7) add `cfengine3-parameters-indent' to address some shortcomings in indentation. 8) improve and capitalize comments in many places, though that work is not complete 9) change the "lighter" modeline indicators from "Cfengine[23]" to "CFE[23]" to take less space Thanks Ted
cfengine.el
Description: application/emacs-lisp
_______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine