From 9b16bc2a01a3554feb9577c507bcc874f863ad81 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Tue, 8 Mar 2016 21:16:54 +0200 Subject: [PATCH] Stop recognizing :#{} as symbol in ruby-mode * lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Remove the weird part that recognized colon followed by interpolation construct without quotes (e.g. ':#{abc}') as symbol, which is just a syntax error in any modern version of Ruby. Fix nearby bug reference. --- lisp/progmodes/ruby-mode.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index b846dfe9191..914703d5f1b 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -2188,11 +2188,11 @@ See `font-lock-syntax-table'.") (2 font-lock-constant-face) (3 (unless (and (eq (char-before (match-end 3)) ?=) (eq (char-after (match-end 3)) ?>)) - ;; bug#18466 + ;; bug#18644 font-lock-constant-face) nil t)) ;; Symbols with special characters. - ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" + ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\)\\)" 2 font-lock-constant-face) ;; Special globals. (,(concat "\\$\\(?:[:\"!@;,/\\._><\\$?~=*&`'+0-9]\\|-[0adFiIlpvw]\\|" -- 2.39.2