Skip to content

Commit

Permalink
Remove duplication in function body
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Mar 1, 2024
1 parent 2f626c6 commit 4afa7be
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions zig-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -427,14 +427,12 @@ This is written mainly to be used as `end-of-defun-function' for Zig."
(point) end))

(defun zig-mode-syntactic-face-function (state)
(if (nth 3 state)
(save-excursion
(goto-char (nth 8 state))
(save-excursion
(goto-char (nth 8 state))
(if (nth 3 state)
(if (looking-at "\\\\\\\\")
'zig-multiline-string-face
'font-lock-string-face))
(save-excursion
(goto-char (nth 8 state))
'font-lock-string-face)
(if (looking-at "//[/|!][^/]")
'font-lock-doc-face
'font-lock-comment-face))))
Expand Down

0 comments on commit 4afa7be

Please sign in to comment.