aboutsummaryrefslogtreecommitdiffstats
path: root/test/indent/ruby.rb
diff options
context:
space:
mode:
authorDmitry Gutov2016-03-09 16:43:51 +0200
committerDmitry Gutov2016-03-09 17:22:56 +0200
commit1b9d6163b023aaefd15d38ea28e968a113202402 (patch)
tree7a1823db56e0f353388a7c25ae03a6824bfb1a88 /test/indent/ruby.rb
parent9b16bc2a01a3554feb9577c507bcc874f863ad81 (diff)
downloademacs-1b9d6163b023aaefd15d38ea28e968a113202402.tar.gz
emacs-1b9d6163b023aaefd15d38ea28e968a113202402.zip
Propertize operator symbol names with symbol syntax class
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize): Do it here. (ruby-font-lock-keywords): Instead of handling them here. Leave highlighting them to the "normal" matcher, because now we can. (ruby-smie--forward-token, ruby-smie--backward-token): Likewise, don't special-case operator symbols anymore. (ruby-smie--args-separator-p): Simplify the regexp, match operator names with \s_. (ruby-smie--implicit-semi-p): Handle the special cases of ? and = at EOL the same way: check if the character has been assigned the symbol syntax class by syntax-propertize.
Diffstat (limited to 'test/indent/ruby.rb')
-rw-r--r--test/indent/ruby.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb
index 49478602e41..3fdb68064be 100644
--- a/test/indent/ruby.rb
+++ b/test/indent/ruby.rb
@@ -168,6 +168,12 @@ if x == :!=
168 something 168 something
169end 169end
170 170
171qux :+,
172 bar,
173 :[]=,
174 bar,
175 :a
176
171# Example from http://www.ruby-doc.org/docs/ProgrammingRuby/html/language.html 177# Example from http://www.ruby-doc.org/docs/ProgrammingRuby/html/language.html
172d = 4 + 5 + # no '\' needed 178d = 4 + 5 + # no '\' needed
173 6 + 7 179 6 + 7