summaryrefslogtreecommitdiff
path: root/lisp/progmodes/ruby-mode.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-05-13 07:45:30 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-05-13 07:45:30 -0700
commit1adfb5ee55d16cd3d9d78998ae7bbb8e5708d9c5 (patch)
tree8a02e7689c33e13e15120508d724c497a14847c4 /lisp/progmodes/ruby-mode.el
parent97c05cc892af85abd9438d2f685d08c557a0d9fb (diff)
parent9c2a1a264cf418fcf187b95b49fe986b32ceabef (diff)
downloademacs-1adfb5ee55d16cd3d9d78998ae7bbb8e5708d9c5.tar.gz
Merge from origin/emacs-25
9c2a1a2 * doc/misc/texinfo.tex: Sync from gnulib. 66cd4d8 * lisp/emacs-lisp/find-func.el (find-feature-regexp) (find-al... 1a5a05c Do not mistake colon at the end of regexp for slash symbol 4c5a00b Make package-install-from-buffer not move point 9596ea1 ; Revert "* emacs-lisp/lisp-mnt.el (lm-header): save-excursion" f79c352 Redo the fix for bug#21839 8d2f78c Don't treat JS spread as contination method call
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
-rw-r--r--lisp/progmodes/ruby-mode.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 972bf99145e..cd3b04de712 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -1858,7 +1858,9 @@ It will be properly highlighted even when the call omits parens.")
(string-to-syntax "'"))))
;; Symbols with special characters.
("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\)\\)"
- (3 (string-to-syntax "_")))
+ (3 (unless (nth 8 (syntax-ppss (match-beginning 3)))
+ (goto-char (match-end 0))
+ (string-to-syntax "_"))))
;; Part of method name when at the end of it.
("[!?]"
(0 (unless (save-excursion