Function: cfengine2-mode
cfengine2-mode is an autoloaded, interactive and byte-compiled
function defined in cfengine.el.gz.
Signature
(cfengine2-mode)
Documentation
Major mode for editing CFEngine2 input.
There are no special keybindings by default.
Action blocks are treated as defuns, i.e. C-M-a (beginning-of-defun) moves
to the action header.
In addition to any hooks its parent mode prog-mode might have run,
this mode runs the hook cfengine2-mode-hook, as the final or
penultimate step during initialization.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cfengine.el.gz
;;;###autoload
(define-derived-mode cfengine2-mode prog-mode "CFE2"
"Major mode for editing CFEngine2 input.
There are no special keybindings by default.
Action blocks are treated as defuns, i.e. \\[beginning-of-defun] moves
to the action header."
(cfengine-common-settings)
(cfengine-common-syntax cfengine2-mode-syntax-table)
;; Shell commands can be quoted by single, double or back quotes.
;; It's debatable whether we should define string syntax, but it
;; should avoid potential confusion in some cases.
(modify-syntax-entry ?\` "\"" cfengine2-mode-syntax-table)
(setq-local indent-line-function #'cfengine2-indent-line)
(setq-local outline-regexp "[ \t]*\\(\\sw\\|\\s_\\)+:+")
(setq-local outline-level #'cfengine2-outline-level)
(setq-local fill-paragraph-function #'cfengine-fill-paragraph)
(setq font-lock-defaults
'(cfengine2-font-lock-keywords nil nil nil beginning-of-line))
;; Fixme: set the args of functions in evaluated classes to string
;; syntax, and then obey syntax properties.
(setq imenu-generic-expression cfengine2-imenu-expression)
(setq-local beginning-of-defun-function #'cfengine2-beginning-of-defun)
(setq-local end-of-defun-function #'cfengine2-end-of-defun))