[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 3a1a220: Improve Ruby 1.9-style keyword keys high
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] emacs-25 3a1a220: Improve Ruby 1.9-style keyword keys highlighting |
Date: |
Sun, 15 Nov 2015 05:25:31 +0000 |
branch: emacs-25
commit 3a1a220b02fa5627718380b2bd0a04800db098fb
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Improve Ruby 1.9-style keyword keys highlighting
* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords):
Handle required keyword arguments (bug#21367).
And highlight the colon together with the name.
---
lisp/progmodes/ruby-mode.el | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 0933886..7547851 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -2193,8 +2193,9 @@ See `font-lock-syntax-table'.")
;; Constants.
("\\(?:\\_<\\|::\\)\\([A-Z]+\\(\\w\\|_\\)*\\)"
1 (unless (eq ?\( (char-after)) font-lock-type-face))
- ("\\(^\\s *\\|[[{(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]"
- (2 font-lock-constant-face))
+ ;; Ruby 1.9-style symbol hash keys.
+ ("\\(?:^\\s *\\|[[{(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+:\\)[^:]"
+ (1 (progn (forward-char -1) font-lock-constant-face)))
;; Conversion methods on Kernel.
(,(concat ruby-font-lock-keyword-beg-re
(regexp-opt '("Array" "Complex" "Float" "Hash"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 3a1a220: Improve Ruby 1.9-style keyword keys highlighting,
Dmitry Gutov <=