Commit dfdb365c authored by Dmitry Gutov's avatar Dmitry Gutov

* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Handle the

inconsistent second element of the list returned by
`smie-indent--parent'.
(ruby-font-lock-keywords): Disqualify any identifier before `=' as
method call.
parent 62f95022
......@@ -2,6 +2,10 @@
* progmodes/ruby-mode.el (ruby-smie-rules): Don't indent specially
after `=>' (bug#16811).
(ruby-smie-rules): Handle the inconsistent second element of the
list returned by `smie-indent--parent'.
(ruby-font-lock-keywords): Disqualify any identifier before `=' as
method call.
2014-02-23 Juanma Barranquero <lekktu@gmail.com>
......
......@@ -630,9 +630,11 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
(save-excursion
;; Traverse up the parents until the parent is "." at
;; indentation, or any other token.
(while (and (progn
(goto-char (1- (cadr (smie-indent--parent))))
(not (ruby-smie--bosp)))
(while (and (let ((parent (smie-indent--parent)))
(goto-char (cadr parent))
(save-excursion
(unless (integerp (car parent)) (forward-char -1))
(not (ruby-smie--bosp))))
(progn
(setq smie--parent nil)
(smie-rule-parent-p "."))))
......@@ -2061,7 +2063,7 @@ See `font-lock-syntax-table'.")
"refine"
"using")
'symbols))
(1 (unless (looking-at " *\\(?:[]|,.)}]\\|$\\)")
(1 (unless (looking-at " *\\(?:[]|,.)}=]\\|$\\)")
font-lock-builtin-face)))
;; Kernel methods that have no required arguments.
(,(concat
......
......@@ -357,6 +357,13 @@ def qux
.lose(
q, p)
a.records().map(&:b).zip(
foo)
# FIXME: This is not consistent with the example below it, but this
# ofset only happens if the colon is at eol, which wouldn't be often.
# Tokenizing `bar:' as `:bar =>' would be better, but it's hard to
# distinguish from a variable reference inside a ternary operator.
foo(bar:
tee)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment