Function: cmake-mode
cmake-mode is an interactive and natively compiled function defined in
cmake-mode.el.
Signature
(cmake-mode)
Documentation
Major mode for editing CMake source files.
In addition to any hooks its parent mode prog-mode might have run,
this mode runs the hook cmake-mode-hook, as the final or penultimate
step during initialization.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/xpmgnbrvz0j5ic5m3q6fvh28ca8a9avm-emacs-packages-deps/share/emacs/site-lisp/elpa/cmake-mode-20261002.1529/cmake-mode.el
;;------------------------------------------------------------------------------
;; Mode definition.
;;
;;;###autoload
(define-derived-mode cmake-mode prog-mode "CMake"
"Major mode for editing CMake source files."
;; Setup jumping to beginning/end of a CMake function/macro.
(set (make-local-variable 'beginning-of-defun-function) #'cmake-beginning-of-defun)
(set (make-local-variable 'end-of-defun-function) #'cmake-end-of-defun)
; Setup font-lock mode.
(set (make-local-variable 'font-lock-defaults) '(cmake-font-lock-keywords))
; Setup indentation function.
(set (make-local-variable 'indent-line-function) 'cmake-indent)
; Setup comment syntax.
(set (make-local-variable 'comment-start) "#")
;; Setup syntax propertization
(set (make-local-variable 'syntax-propertize-function) cmake--syntax-propertize-function)
(add-hook 'syntax-propertize-extend-region-functions #'syntax-propertize-multiline nil t))