* 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>
(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 "."))))
"refine"
"using")
'symbols))
- (1 (unless (looking-at " *\\(?:[]|,.)}]\\|$\\)")
+ (1 (unless (looking-at " *\\(?:[]|,.)}=]\\|$\\)")
font-lock-builtin-face)))
;; Kernel methods that have no required arguments.
(,(concat
.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)