Recognize functions and macros as defuns in 'cmake-ts-mode'
* lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode--function-name):
Renamed to 'cmake-ts-mode--defun-name' since the function handles
now functions and macros.
(cmake-ts-mode--defun-name): Return text of the first 'argument'
node below 'function_def' and 'macro_def' nodes.
(cmake-ts-mode): Set up treesit-defun-type-regexp and
'treesit-defun-name-function'. Change the imenu setup to
recognize macros too. Since we have set up
'treesit-defun-name-function', we don't have to
pass 'cmake-ts-mode--function-name' anymore. (Bug#69186)
To make `treesit-defun-at-point' work properly, we have to recognize
function_def/macro_def nodes, not the lower-level *_command nodes.
(cherry picked from commit
6b6761d534259ab4d5409e72754e46af13623dda)