ruby-syntax-propertize: Fix certain cases following ::
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize): Make sure to backtrack if the "symbols with special characters" rule is aborted because of preceding colon.
This commit is contained in:
parent
e38e7b7bc1
commit
83efac6477
2 changed files with 3 additions and 3 deletions
|
@ -1869,8 +1869,8 @@ It will be properly highlighted even when the call omits parens.")
|
|||
;; Symbols with special characters.
|
||||
(":\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\)"
|
||||
(1 (unless (or
|
||||
(eq (char-before (match-beginning 0)) ?:)
|
||||
(nth 8 (syntax-ppss (match-beginning 1))))
|
||||
(nth 8 (syntax-ppss (match-beginning 1)))
|
||||
(eq (char-before (match-beginning 0)) ?:))
|
||||
(goto-char (match-end 0))
|
||||
(string-to-syntax "_"))))
|
||||
;; Symbols ending with '=' (bug#42846).
|
||||
|
|
|
@ -108,7 +108,7 @@ def foo
|
|||
# Multiline regexp.
|
||||
/bars
|
||||
tees # toots
|
||||
nfoos/
|
||||
nfoos::/
|
||||
|
||||
def test1(arg)
|
||||
puts "hello"
|
||||
|
|
Loading…
Add table
Reference in a new issue