|
277 | 277 | ((looking-at elixir-smie--operator-regexp) |
278 | 278 | (goto-char (match-end 0)) |
279 | 279 | "OP") |
280 | | - (t |
281 | | - (let ((token (smie-default-forward-token))) |
282 | | - (unless (elixir-smie-empty-string-p token) |
283 | | - token))))) |
| 280 | + (t (let ((token (smie-default-forward-token))) |
| 281 | + (unless (or (elixir-smie-empty-string-p token) |
| 282 | + (elixir-smie--at-dot-call)) |
| 283 | + token))))) |
| 284 | + |
| 285 | +(defun elixir-smie--at-dot-call () |
| 286 | + (and (eq ?w (char-syntax (following-char))) |
| 287 | + (eq (char-before) ?.) |
| 288 | + (not (eq (char-before (1- (point))) ?.)))) |
284 | 289 |
|
285 | 290 | (defun elixir-smie-backward-token () |
286 | 291 | (let ((pos (point))) |
|
303 | 308 | ((looking-back elixir-smie--operator-regexp (- (point) 3) t) |
304 | 309 | (goto-char (match-beginning 0)) |
305 | 310 | "OP") |
306 | | - (t (smie-default-backward-token))))) |
| 311 | + (t (let ((token (smie-default-backward-token))) |
| 312 | + (unless (or (elixir-smie-empty-string-p token) |
| 313 | + (elixir-smie--at-dot-call)) |
| 314 | + token)))))) |
307 | 315 |
|
308 | 316 | (defun verbose-elixir-smie-rules (kind token) |
309 | 317 | (let ((value (elixir-smie-rules kind token))) |
|
574 | 582 | ;; ... |
575 | 583 | ((and (not (smie-rule-hanging-p)) |
576 | 584 | (smie-rule-parent-p "do")) |
577 | | - elixir-smie-indent-basic) |
| 585 | + elixir-smie-indent-basic) |
578 | 586 | ((and (not (smie-rule-hanging-p)) |
579 | 587 | (smie-rule-parent-p "MATCH-STATEMENT-DELIMITER")) |
580 | 588 | (smie-rule-parent)) |
|
707 | 715 | (let ((pos (point))) |
708 | 716 | (parse-partial-sexp 1 pos))))) |
709 | 717 | (and (looking-at "\"\"\"") |
710 | | - (match-beginning 0))))) |
| 718 | + (match-beginning 0))))) |
711 | 719 |
|
712 | 720 | (defun elixir-smie--previous-line-empty-p () |
713 | 721 | "Return non-nil if the previous line is blank." |
|
0 commit comments