Commit 4fab7bad authored by Dmitry Gutov's avatar Dmitry Gutov
Browse files

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 `>'.
parent 0c1dd712
2015-03-09 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-font-lock-keywords): Don't consider
`=' a part of symbol when followed by `>'. (Bug#18644)
2015-03-09 Eli Zaretskii <eliz@gnu.org> 2015-03-09 Eli Zaretskii <eliz@gnu.org>
   
* dired.el (dired-delete-file): Doc fix. (Bug#20021) * dired.el (dired-delete-file): Doc fix. (Bug#20021)
......
...@@ -2155,8 +2155,16 @@ See `font-lock-syntax-table'.") ...@@ -2155,8 +2155,16 @@ See `font-lock-syntax-table'.")
;; Keywords that evaluate to certain values. ;; Keywords that evaluate to certain values.
("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>" ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>"
(0 font-lock-builtin-face)) (0 font-lock-builtin-face))
;; Symbols. ;; Symbols with symbol characters.
("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" ("\\(^\\|[^:]\\)\\(:@?\\(?:\\w\\|_\\)+\\)\\([!?=]\\)?"
(2 font-lock-constant-face)
(3 (unless (and (eq (char-before (match-end 3)) ?=)
(eq (char-after (match-end 3)) ?>))
;; bug#18466
font-lock-constant-face)
nil t))
;; Symbols with special characters.
("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)"
2 font-lock-constant-face) 2 font-lock-constant-face)
;; Special globals. ;; Special globals.
(,(concat "\\$\\(?:[:\"!@;,/\\._><\\$?~=*&`'+0-9]\\|-[0adFiIlpvw]\\|" (,(concat "\\$\\(?:[:\"!@;,/\\._><\\$?~=*&`'+0-9]\\|-[0adFiIlpvw]\\|"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment