diff options
| author | Dmitry Gutov | 2015-03-09 05:26:57 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2015-03-09 05:26:57 +0200 |
| commit | 4fab7badf5ce341cd6b1e32e72f55eee5c3962e8 (patch) | |
| tree | bf6e9c09835d69df7387dbfa7a6f66fac88cf3ad /lisp/progmodes/ruby-mode.el | |
| parent | 0c1dd712f7682ad85aad82c09967748ca5bed7eb (diff) | |
| download | emacs-4fab7badf5ce341cd6b1e32e72f55eee5c3962e8.tar.gz emacs-4fab7badf5ce341cd6b1e32e72f55eee5c3962e8.zip | |
ruby-mode: Don't consider `=' a part of symbol when followed by `>'
Fixes: debbugs:18644
* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Don't consider
`=' a part of symbol when followed by `>'.
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 4abc413f636..06b1fcf1729 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -2155,8 +2155,16 @@ See `font-lock-syntax-table'.") | |||
| 2155 | ;; Keywords that evaluate to certain values. | 2155 | ;; Keywords that evaluate to certain values. |
| 2156 | ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>" | 2156 | ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>" |
| 2157 | (0 font-lock-builtin-face)) | 2157 | (0 font-lock-builtin-face)) |
| 2158 | ;; Symbols. | 2158 | ;; Symbols with symbol characters. |
| 2159 | ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" | 2159 | ("\\(^\\|[^:]\\)\\(:@?\\(?:\\w\\|_\\)+\\)\\([!?=]\\)?" |
| 2160 | (2 font-lock-constant-face) | ||
| 2161 | (3 (unless (and (eq (char-before (match-end 3)) ?=) | ||
| 2162 | (eq (char-after (match-end 3)) ?>)) | ||
| 2163 | ;; bug#18466 | ||
| 2164 | font-lock-constant-face) | ||
| 2165 | nil t)) | ||
| 2166 | ;; Symbols with special characters. | ||
| 2167 | ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" | ||
| 2160 | 2 font-lock-constant-face) | 2168 | 2 font-lock-constant-face) |
| 2161 | ;; Special globals. | 2169 | ;; Special globals. |
| 2162 | (,(concat "\\$\\(?:[:\"!@;,/\\._><\\$?~=*&`'+0-9]\\|-[0adFiIlpvw]\\|" | 2170 | (,(concat "\\$\\(?:[:\"!@;,/\\._><\\$?~=*&`'+0-9]\\|-[0adFiIlpvw]\\|" |