Do not tokenize a comment before continuation as ';'
* lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Account for a comment right after point.
This commit is contained in:
parent
040362001d
commit
dbfbedd3d0
2 changed files with 2 additions and 2 deletions
|
@ -443,7 +443,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
|
||||||
(member (save-excursion (ruby-smie--backward-token))
|
(member (save-excursion (ruby-smie--backward-token))
|
||||||
'("iuwu-mod" "and" "or")))
|
'("iuwu-mod" "and" "or")))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(forward-comment 1)
|
(forward-comment (point-max))
|
||||||
(looking-at "&?\\."))))))
|
(looking-at "&?\\."))))))
|
||||||
|
|
||||||
(defun ruby-smie--redundant-do-p (&optional skip)
|
(defun ruby-smie--redundant-do-p (&optional skip)
|
||||||
|
|
|
@ -222,7 +222,7 @@ def begin
|
||||||
bar
|
bar
|
||||||
|
|
||||||
# https://github.com/rails/rails/blob/17f5d8e062909f1fcae25351834d8e89967b645e/activesupport/lib/active_support/time_with_zone.rb#L206
|
# https://github.com/rails/rails/blob/17f5d8e062909f1fcae25351834d8e89967b645e/activesupport/lib/active_support/time_with_zone.rb#L206
|
||||||
foo
|
foo # comment intended to confuse the tokenizer
|
||||||
.bar
|
.bar
|
||||||
|
|
||||||
z = {
|
z = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue