File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 101101(defun elixir-smie--semi-ends-match ()
102102 " Return non-nil if the current line concludes a match block."
103103 (save-excursion
104- (if (eolp )
105- nil
104+ ; ; Warning: Recursion.
105+ ; ; This is easy though.
106+
107+ ; ; 1. If we're at a blank line, move forward a character. This takes us to
108+ ; ; the next line.
109+ ; ; 2. If we're not at the end of the buffer, call this function again.
110+ ; ; (Otherwise, return nil.)
111+
112+ ; ; The point here is that we want to treat blank lines as a single semi-
113+ ; ; colon when it comes to detecting the end of match statements. This could
114+ ; ; also be handled by a `while' expression or some other looping mechanism.
115+ (if (and (eolp ) (bolp ))
116+ (progn (forward-char )
117+ (if (< (point ) (point-max ))
118+ (elixir-smie--semi-ends-match)
119+ nil ))
120+ ; ; And if we're NOT on a blank line, move to the end of the line, and see
121+ ; ; if we're looking back at a block operator.
106122 (progn (move-end-of-line 1 )
107123 (looking-back elixir-smie--block-operator-regexp)))))
108124
You can’t perform that action at this time.
0 commit comments