1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

* progmodes/ruby-mode.el (ruby-font-lock-keywords): Use "\\_<" instead

of "\\b".  Remove some checks made superfluous as a result.
This commit is contained in:
Dmitry Gutov 2013-01-28 02:32:11 +04:00
parent 629cb6ec00
commit 499572e4d5
2 changed files with 14 additions and 4 deletions

View file

@ -1,3 +1,13 @@
2013-01-27 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-font-lock-keywords): Remove some
checks made superfluous by the \_< operator.
2013-01-27 Nobuyoshi Nakada <nobu@ruby-lang.org>
* progmodes/ruby-mode.el (ruby-font-lock-keywords): Use "\\_<"
instead of "\\b".
2013-01-27 Michael Albinus <michael.albinus@gmx.de>
* autorevert.el (auto-revert-handler): Notifications which result

View file

@ -1552,7 +1552,7 @@ See `font-lock-syntax-table'.")
1 font-lock-function-name-face)
;; keywords
(cons (concat
"\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\(defined\\?\\|"
"\\(^\\|[^.@$]\\|\\.\\.\\)\\_<\\(defined\\?\\|"
(regexp-opt
'("alias_method"
"alias"
@ -1602,7 +1602,7 @@ See `font-lock-syntax-table'.")
`(,ruby-here-doc-beg-re 0 (unless (ruby-singleton-class-p (match-beginning 0))
'font-lock-string-face))
;; variables
'("\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\(nil\\|self\\|true\\|false\\)\\>"
'("\\(^\\|[^.@$]\\|\\.\\.\\)\\_<\\(nil\\|self\\|true\\|false\\)\\>"
2 font-lock-variable-name-face)
;; symbols
'("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)"
@ -1613,8 +1613,8 @@ See `font-lock-syntax-table'.")
'("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+"
0 font-lock-variable-name-face)
;; constants
'("\\(^\\|[^_]\\)\\b\\([A-Z]+\\(\\w\\|_\\)*\\)"
2 font-lock-type-face)
'("\\_<\\([A-Z]+\\(\\w\\|_\\)*\\)"
1 font-lock-type-face)
'("\\(^\\s *\\|[\[\{\(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" 2 font-lock-constant-face)
;; expression expansion
'(ruby-match-expression-expansion