File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed
Expand file tree Collapse file tree 1 file changed +15
-15
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- (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)))))
115+ (flet ((self-call ()
116+ ( if ( < ( point ) (point-max ))
117+ (elixir-smie--semi-ends-match )
118+ nil ) ))
119+ ( cond
120+ (( and ( eolp ) ( bolp ))
121+ ( forward-char )
122+ (self-call) )
123+ (( looking-at elixir-smie--spaces-til-eol-regexp )
124+ ( move-beginning-of-line 2 )
125+ (self-call ))
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) )))))
130130
131131(defun elixir-smie--same-line-as-parent (parent-pos child-pos )
132132 " 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