1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00

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:
Dmitry Gutov 2016-03-15 03:15:18 +02:00
parent 040362001d
commit dbfbedd3d0
2 changed files with 2 additions and 2 deletions

View File

@ -443,7 +443,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
(member (save-excursion (ruby-smie--backward-token))
'("iuwu-mod" "and" "or")))
(save-excursion
(forward-comment 1)
(forward-comment (point-max))
(looking-at "&?\\."))))))
(defun ruby-smie--redundant-do-p (&optional skip)

View File

@ -222,7 +222,7 @@ def begin
bar
# 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
z = {