File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 169169
170170(defun elixir-smie--semi-ends-match ()
171171 " Return non-nil if the current line concludes a match block."
172+ (when (not (eobp ))
172173 (save-excursion
173174 ; ; Warning: Recursion.
174175 ; ; This is easy though.
195196 ; ; And if we're NOT on a blank line, move to the end of the line, and see
196197 ; ; if we're looking back at a block operator.
197198 (t (move-end-of-line 1 )
198- (looking-back elixir-smie--block-operator-regexp))))))
199+ (looking-back elixir-smie--block-operator-regexp)))))))
199200
200201(defun elixir-smie--same-line-as-parent (parent-pos child-pos )
201202 " Return non-nil if `child-pos' is on same line as `parent-pos' ."
211212 ((and (or (looking-at elixir-smie--comment-regexp)
212213 (looking-at " [\n #]" ))
213214 (elixir-smie--implicit-semi-p))
214- (if (eolp ) (forward-char 1 ) (forward-comment 1 ))
215+ (when (not (save-excursion
216+ (forward-comment 1 )
217+ (eobp )))
218+ (if (eolp ) (forward-char 1 ) (forward-comment 1 )))
215219 ; ; Note: `elixir-smie--semi-ends-match' will be called when the point is at
216220 ; ; the beginning of a new line. Keep that in mind.
217221 (if (elixir-smie--semi-ends-match)
313317 (cond
314318 ((smie-rule-parent-p " if" )
315319 (smie-rule-parent ))
316-
317320 ((and (smie-rule-parent-p " (" )
318321 (save-excursion
319322 (goto-char (cadr smie--parent))
You can’t perform that action at this time.
0 commit comments