Skip to content

Commit ae60c35

Browse files
committed
Remove unused rules & warehoused code.
Also, broke up 80+ lines.
1 parent 2d570b1 commit ae60c35

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

elixir-smie.el

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
`(progn
5252
(defconst ,regex-name
5353
,regexp)
54-
(pushnew `(,',regex-name . ,(upcase (symbol-name ',name))) elixir-syntax-class-names))))
54+
(pushnew `(,',regex-name . ,(upcase (symbol-name ',name)))
55+
elixir-syntax-class-names))))
5556

56-
;(elixir-smie-define-regexp-opt op "&&" "||" "!")
5757
(elixir-smie-define-regexp dot "\\.")
5858
(elixir-smie-define-regexp comma ",")
5959
(elixir-smie-define-regexp -> "->")
@@ -127,7 +127,8 @@
127127
("{" non-block-expr "}")
128128
("[" non-block-expr "]")
129129
("STRING"))
130-
(match-statements (match-statement "MATCH-STATEMENT-DELIMITER" match-statements)
130+
(match-statements (match-statement "MATCH-STATEMENT-DELIMITER"
131+
match-statements)
131132
(match-statement))
132133
(match-statement (non-block-expr "->" statements)))
133134
'((assoc "if" "do:" "else:")
@@ -155,14 +156,6 @@
155156

156157
(defun elixir-smie-rules (kind token)
157158
(pcase (cons kind token)
158-
(`(:after . "STRING")
159-
(if (smie-rule-prev-p "do:")
160-
(smie-rule-parent 0)
161-
nil))
162-
(`(:elem . basic)
163-
(if (smie-rule-hanging-p)
164-
0
165-
elixir-smie-indent-basic))
166159
(`(:after . "OP")
167160
(cond
168161
((smie-rule-sibling-p) nil)
@@ -173,7 +166,6 @@
173166
;; parent, and offset by `elixir-smie-indent-basic'. Otherwise, indent
174167
;; normally. This helps us work with/indent anonymous function blocks
175168
;; correctly.
176-
(`(:list-intro . ,(or `"do" `";")) t)
177169
(`(:before . ";")
178170
(cond
179171
((smie-rule-parent-p "after" "catch" "def" "defmodule" "defp" "do" "else"

0 commit comments

Comments
 (0)