Variable: cfengine-parameters-indent
cfengine-parameters-indent is a customizable variable defined in
cfengine.el.gz.
Value
(promise pname 2)
Documentation
Indentation of CFEngine3 promise parameters (hanging indent).
For example, say you have this code:
bundle x y
{
section:
class::
promise ...
promiseparameter => ...
}
You can choose to indent promiseparameter from the beginning of the line (absolutely) or from the word "promise" (relatively).
You can also choose to indent the start of the word
"promiseparameter" or the arrow that follows it.
Finally, you can choose the amount of the indent.
The default is to anchor at promise, indent parameter name, and offset 2:
bundle agent rcfiles
{
files:
any::
"/tmp/netrc"
comment => "my netrc",
perms => mog("600", "tzz", "tzz");
}
Here we anchor at beginning of line, indent arrow, and offset 10:
bundle agent rcfiles
{
files:
any::
"/tmp/netrc"
comment => "my netrc",
perms => mog("600", "tzz", "tzz");
}
Some, including cfengine_stdlib.cf, like to anchor at promise, indent arrow, and offset 16 or so:
bundle agent rcfiles
{
files:
any::
"/tmp/netrc"
comment => "my netrc",
perms => mog("600", "tzz", "tzz");
}
This variable was added, or its default value changed, in Emacs 24.4.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cfengine.el.gz
(defcustom cfengine-parameters-indent '(promise pname 2)
"Indentation of CFEngine3 promise parameters (hanging indent).
For example, say you have this code:
bundle x y
{
section:
class::
promise ...
promiseparameter => ...
}
You can choose to indent promiseparameter from the beginning of
the line (absolutely) or from the word \"promise\" (relatively).
You can also choose to indent the start of the word
\"promiseparameter\" or the arrow that follows it.
Finally, you can choose the amount of the indent.
The default is to anchor at promise, indent parameter name, and offset 2:
bundle agent rcfiles
{
files:
any::
\"/tmp/netrc\"
comment => \"my netrc\",
perms => mog(\"600\", \"tzz\", \"tzz\");
}
Here we anchor at beginning of line, indent arrow, and offset 10:
bundle agent rcfiles
{
files:
any::
\"/tmp/netrc\"
comment => \"my netrc\",
perms => mog(\"600\", \"tzz\", \"tzz\");
}
Some, including cfengine_stdlib.cf, like to anchor at promise, indent
arrow, and offset 16 or so:
bundle agent rcfiles
{
files:
any::
\"/tmp/netrc\"
comment => \"my netrc\",
perms => mog(\"600\", \"tzz\", \"tzz\");
}"
:version "24.4"
:type '(list
(choice (const :tag "Anchor at beginning of promise" promise)
(const :tag "Anchor at beginning of line" bol))
(choice (const :tag "Indent parameter name" pname)
(const :tag "Indent arrow" arrow))
(integer :tag "Indentation amount from anchor")))