summaryrefslogtreecommitdiff
path: root/lisp/progmodes/ruby-mode.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2016-03-16 04:32:59 +0200
committerDmitry Gutov <dgutov@yandex.ru>2016-03-16 04:32:59 +0200
commit2036be4666becf02f4524d63595e3da55b14ff0d (patch)
tree327d28def64a3cd558d36efc55e14cb194a4be30 /lisp/progmodes/ruby-mode.el
parent1d686c2afb7c6c869c339f7c70daae969b429429 (diff)
downloademacs-2036be4666becf02f4524d63595e3da55b14ff0d.tar.gz
Fix Ruby's operator precedence
* lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Rearrange the smie-precs->prec2 form.
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
-rw-r--r--lisp/progmodes/ruby-mode.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index edd89b30c9f..60480d603c3 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -406,16 +406,17 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
'((right "=")
(right "+=" "-=" "*=" "/=" "%=" "**=" "&=" "|=" "^="
"<<=" ">>=" "&&=" "||=")
- (left ".." "...")
- (left "+" "-")
- (left "*" "/" "%" "**")
+ (nonassoc ".." "...")
(left "&&" "||")
- (left "^" "&" "|")
(nonassoc "<=>")
- (nonassoc ">" ">=" "<" "<=")
(nonassoc "==" "===" "!=")
(nonassoc "=~" "!~")
+ (nonassoc ">" ">=" "<" "<=")
+ (left "^" "&" "|")
(left "<<" ">>")
+ (left "+" "-")
+ (left "*" "/" "%")
+ (left "**")
(assoc "."))))))
(defun ruby-smie--bosp ()