Skip to content

Commit 0302f65

Browse files
committed
Add fn to test if inside match block.
1 parent 369a268 commit 0302f65

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

elixir-smie.el

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@
9898
(not (or (memq (char-before) '(?\{ ?\[))
9999
(looking-back elixir-smie--operator-regexp (- (point) 3) t))))
100100

101+
(defun elixir-smie--semi-ends-match ()
102+
"Return non-nil if the current line concludes a match block."
103+
(save-excursion
104+
(forward-char)
105+
(if (eolp) nil
106+
(progn (move-end-of-line 1)
107+
(looking-back elixir-smie--operator-regexp)))))
108+
101109
(defun elixir-smie-forward-token ()
102110
(cond
103111
;; If there is nothing but whitespace between the last token and eol, emit

0 commit comments

Comments
 (0)