Skip to content

Commit 5a07b79

Browse files
committed
Merge pull request #108 from sviridov/comment-start-skip
2 parents b91fb23 + 940e1b1 commit 5a07b79

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

elixir-mode.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,7 @@ Argument END End of the region."
641641
'(elixir-font-lock-keywords))
642642
(set (make-local-variable 'comment-start) "# ")
643643
(set (make-local-variable 'comment-end) "")
644+
(set (make-local-variable 'comment-start-skip) "#+ *")
644645
(set (make-local-variable 'comment-use-syntax) t)
645646
(set (make-local-variable 'tab-width) elixir-basic-offset)
646647
(set (make-local-variable 'syntax-propertize-function)

elixir-smie.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@
245245
nil nil nil nil
246246
(set (make-local-variable 'comment-start) "# ")
247247
(set (make-local-variable 'comment-end) "")
248+
(set (make-local-variable 'comment-start-skip) "#+ *")
248249
(smie-setup elixir-smie-grammar 'elixir-smie-rules
249250
:forward-token 'elixir-smie-forward-token
250251
:backward-token 'elixir-smie-backward-token))

test/elixir-mode-indentation-tests.el

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,18 @@ has_something(x) &&
233233
has_something(z)
234234
")
235235

236+
(elixir-def-indentation-test indent-continuation-lines-with-comments/3 ()
237+
"
238+
def str(s, sub, start_pos, end_pos) when is_binary(s) and is_binary(sub) do # and start_pos <= end_pos do
239+
len = end_pos-start_pos
240+
end
241+
"
242+
"
243+
def str(s, sub, start_pos, end_pos) when is_binary(s) and is_binary(sub) do # and start_pos <= end_pos do
244+
len = end_pos-start_pos
245+
end
246+
")
247+
236248
(elixir-def-indentation-test indent-last-commented-line
237249
()
238250
"

0 commit comments

Comments
 (0)