summaryrefslogtreecommitdiff
path: root/lisp/progmodes/ruby-mode.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2014-05-07 20:41:21 -0700
committerGlenn Morris <rgm@gnu.org>2014-05-07 20:41:21 -0700
commitfb3f83f5fd9e80347c8b8e36f6eaefbb912fe57b (patch)
treef106c360c3aef01bcacdc77b66b7c5b20261502e /lisp/progmodes/ruby-mode.el
parent1ba38c429fa6ce17568771ef51c8e53b1a72bb94 (diff)
parent606695a67801acfd1792110e4ea3228b50b0117d (diff)
downloademacs-fb3f83f5fd9e80347c8b8e36f6eaefbb912fe57b.tar.gz
Merge from emacs-24; up to 2014-05-08T03:34:20Z!rgm@gnu.org
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
-rw-r--r--lisp/progmodes/ruby-mode.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 912736707ef..74edf7a680f 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -1804,9 +1804,10 @@ It will be properly highlighted even when the call omits parens.")
;; $' $" $` .... are variables.
;; ?' ?" ?` are character literals (one-char strings in 1.9+).
("\\([?$]\\)[#\"'`]"
- (1 (unless (save-excursion
- ;; Not within a string.
- (nth 3 (syntax-ppss (match-beginning 0))))
+ (1 (if (save-excursion
+ (nth 3 (syntax-ppss (match-beginning 0))))
+ ;; Within a string, skip.
+ (goto-char (match-end 1))
(string-to-syntax "\\"))))
;; Part of symbol when at the end of a method name.
("[!?]"