File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed
Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change 112112 ; ; The point here is that we want to treat blank lines as a single semi-
113113 ; ; colon when it comes to detecting the end of match statements. This could
114114 ; ; 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.
122- (progn (move-end-of-line 1 )
123- (looking-back elixir-smie--block-operator-regexp)))))
115+ (cond
116+ ((and (eolp ) (bolp ))
117+ (forward-char )
118+ (if (< (point ) (point-max ))
119+ (elixir-smie--semi-ends-match)
120+ nil ))
121+ ((looking-at elixir-smie--spaces-til-eol-regexp)
122+ (move-beginning-of-line 2 )
123+ (if (< (point ) (point-max ))
124+ (elixir-smie--semi-ends-match)
125+ nil ))
126+ ; ; And if we're NOT on a blank line, move to the end of the line, and see
127+ ; ; if we're looking back at a block operator.
128+ (t (move-end-of-line 1 )
129+ (looking-back elixir-smie--block-operator-regexp)))))
124130
125131(defun elixir-smie--same-line-as-parent (parent-pos child-pos )
126132 " Return non-nil if `child-pos' is on same line as `parent-pos' ."
You can’t perform that action at this time.
0 commit comments