|
102 | 102 | "Return non-nil if the current line concludes a match block." |
103 | 103 | (save-excursion |
104 | 104 | (forward-char) |
105 | | - (if (eolp) nil |
| 105 | + (if (eolp) |
| 106 | + nil |
106 | 107 | (progn (move-end-of-line 1) |
107 | | - (looking-back elixir-smie--operator-regexp))))) |
| 108 | + (looking-back elixir-smie--block-operator-regexp |
| 109 | + (- (point) 2) t))))) |
108 | 110 |
|
109 | 111 | (defun elixir-smie-forward-token () |
110 | 112 | (cond |
|
120 | 122 | ";")) |
121 | 123 | ((looking-at elixir-smie--block-operator-regexp) |
122 | 124 | (goto-char (match-end 0)) |
123 | | - "MATCH-STATEMENT-DELIMITER") |
| 125 | + "->") |
124 | 126 | ((looking-at elixir-smie--operator-regexp) |
125 | 127 | (goto-char (match-end 0)) |
126 | 128 | "OP") |
|
137 | 139 | ";")) |
138 | 140 | ((looking-back elixir-smie--block-operator-regexp (- (point) 3) t) |
139 | 141 | (goto-char (match-beginning 0)) |
140 | | - "MATCH-STATEMENT-DELIMITER") |
| 142 | + "->") |
141 | 143 | ((looking-back elixir-smie--operator-regexp (- (point) 3) t) |
142 | 144 | (goto-char (match-beginning 0)) |
143 | 145 | "OP") |
|
165 | 167 | (cond |
166 | 168 | ((and (not (smie-rule-sibling-p)) |
167 | 169 | (smie-rule-hanging-p)) |
168 | | - (smie-rule-parent elixir-smie-indent-basic)) |
169 | | - ((and (smie-rule-hanging-p) |
170 | | - (smie-rule-sibling-p)) |
171 | | - (smie-rule-parent)))) |
| 170 | + (smie-rule-parent elixir-smie-indent-basic)))) |
| 171 | + ;; ((and (smie-rule-hanging-p) |
| 172 | + ;; (smie-rule-sibling-p)) |
| 173 | + ;; (smie-rule-parent)))) |
172 | 174 |
|
173 | 175 | (`(:after . "MATCH-STATEMENT-DELIMITER") |
174 | 176 | (cond |
|
179 | 181 | (smie-rule-hanging-p)) |
180 | 182 | (smie-rule-parent elixir-smie-indent-basic)))) |
181 | 183 |
|
| 184 | + (`(:before . "->") |
| 185 | + (cond |
| 186 | + ((smie-rule-hanging-p) |
| 187 | + (smie-rule-parent elixir-smie-indent-basic)))) |
| 188 | + |
182 | 189 | (`(:before . ";") |
183 | 190 | (cond |
184 | 191 | ((smie-rule-parent-p "after" "catch" "def" "defmodule" "defp" "do" "else" |
|
0 commit comments