branch: elpa/zig-mode commit b7d96132b87adeac202abfa04c055707df3752eb Author: ventlark <ventl...@gmail.com> Commit: ventlark <ventl...@gmail.com>
Account for braces inside of function parameters --- zig-mode.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zig-mode.el b/zig-mode.el index cc192f18..ce0ca2e 100644 --- a/zig-mode.el +++ b/zig-mode.el @@ -309,6 +309,12 @@ at the beginning of the defun body. This is written mainly to be used as `end-of-defun-function' for Zig." (interactive) + ;; Jump over the function parameters, if they exist. + (if (re-search-forward "(" (point-at-eol) t) + (progn + (backward-char) + (forward-sexp))) + ;; Find the opening brace (if (re-search-forward "[{]" nil t) (progn