emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/zig-mode b7d9613 091/104: Account for braces inside of fun


From: ELPA Syncer
Subject: [nongnu] elpa/zig-mode b7d9613 091/104: Account for braces inside of function parameters
Date: Sun, 29 Aug 2021 11:37:09 -0400 (EDT)

branch: elpa/zig-mode
commit b7d96132b87adeac202abfa04c055707df3752eb
Author: ventlark <ventlark@gmail.com>
Commit: ventlark <ventlark@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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]