diff options
| author | Dmitry Gutov | 2014-05-06 03:18:18 +0400 |
|---|---|---|
| committer | Dmitry Gutov | 2014-05-06 03:18:18 +0400 |
| commit | 4dd3c4d53af81b017363cb778ac6fd5abea2d132 (patch) | |
| tree | fafb9f8f9a770822ffac65fe5f1aa9f9c20992c0 /lisp | |
| parent | 6da8d069757fd26ee537704a9f0dea24dc5e00b8 (diff) | |
| download | emacs-4dd3c4d53af81b017363cb778ac6fd5abea2d132.tar.gz emacs-4dd3c4d53af81b017363cb778ac6fd5abea2d132.zip | |
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function):
Backtrack one char if the global/char-literal var matcher hits
inside a string. The next char could be the beginning of an
expression expansion.
* test/automated/ruby-mode-tests.el
(ruby-interpolation-after-dollar-sign): New test.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3bbacb85e97..7c838a61fe5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-05-05 Dmitry Gutov <dgutov@yandex.ru> | ||
| 2 | |||
| 3 | * progmodes/ruby-mode.el (ruby-syntax-propertize-function): | ||
| 4 | Backtrack one char if the global/char-literal var matcher hits | ||
| 5 | inside a string. The next char could be the beginning of an | ||
| 6 | expression expansion. | ||
| 7 | |||
| 1 | 2014-05-05 Glenn Morris <rgm@gnu.org> | 8 | 2014-05-05 Glenn Morris <rgm@gnu.org> |
| 2 | 9 | ||
| 3 | * help-fns.el (describe-function-1): Test for an autoload before a | 10 | * help-fns.el (describe-function-1): Test for an autoload before a |
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.") | |||
| 1804 | ;; $' $" $` .... are variables. | 1804 | ;; $' $" $` .... are variables. |
| 1805 | ;; ?' ?" ?` are character literals (one-char strings in 1.9+). | 1805 | ;; ?' ?" ?` are character literals (one-char strings in 1.9+). |
| 1806 | ("\\([?$]\\)[#\"'`]" | 1806 | ("\\([?$]\\)[#\"'`]" |
| 1807 | (1 (unless (save-excursion | 1807 | (1 (if (save-excursion |
| 1808 | ;; Not within a string. | 1808 | (nth 3 (syntax-ppss (match-beginning 0)))) |
| 1809 | (nth 3 (syntax-ppss (match-beginning 0)))) | 1809 | ;; Within a string, skip. |
| 1810 | (goto-char (match-end 1)) | ||
| 1810 | (string-to-syntax "\\")))) | 1811 | (string-to-syntax "\\")))) |
| 1811 | ;; Part of symbol when at the end of a method name. | 1812 | ;; Part of symbol when at the end of a method name. |
| 1812 | ("[!?]" | 1813 | ("[!?]" |