aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2013-01-28 02:32:11 +0400
committerDmitry Gutov2013-01-28 02:32:11 +0400
commit499572e4d5ddd2ef4dd04e2f234205daed501b08 (patch)
tree9c0e4d93b16f6bd7ad2d64156bc5a09012552c69
parent629cb6ec0015827ba2248ce4eb700bb12431fa37 (diff)
downloademacs-499572e4d5ddd2ef4dd04e2f234205daed501b08.tar.gz
emacs-499572e4d5ddd2ef4dd04e2f234205daed501b08.zip
* progmodes/ruby-mode.el (ruby-font-lock-keywords): Use "\\_<" instead
of "\\b". Remove some checks made superfluous as a result.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/progmodes/ruby-mode.el8
2 files changed, 14 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 610a237b050..cc30dc82341 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12013-01-27 Dmitry Gutov <dgutov@yandex.ru>
2
3 * progmodes/ruby-mode.el (ruby-font-lock-keywords): Remove some
4 checks made superfluous by the \_< operator.
5
62013-01-27 Nobuyoshi Nakada <nobu@ruby-lang.org>
7
8 * progmodes/ruby-mode.el (ruby-font-lock-keywords): Use "\\_<"
9 instead of "\\b".
10
12013-01-27 Michael Albinus <michael.albinus@gmx.de> 112013-01-27 Michael Albinus <michael.albinus@gmx.de>
2 12
3 * autorevert.el (auto-revert-handler): Notifications which result 13 * autorevert.el (auto-revert-handler): Notifications which result
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index a42a66dfa87..989c00365a0 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -1552,7 +1552,7 @@ See `font-lock-syntax-table'.")
1552 1 font-lock-function-name-face) 1552 1 font-lock-function-name-face)
1553 ;; keywords 1553 ;; keywords
1554 (cons (concat 1554 (cons (concat
1555 "\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\(defined\\?\\|" 1555 "\\(^\\|[^.@$]\\|\\.\\.\\)\\_<\\(defined\\?\\|"
1556 (regexp-opt 1556 (regexp-opt
1557 '("alias_method" 1557 '("alias_method"
1558 "alias" 1558 "alias"
@@ -1602,7 +1602,7 @@ See `font-lock-syntax-table'.")
1602 `(,ruby-here-doc-beg-re 0 (unless (ruby-singleton-class-p (match-beginning 0)) 1602 `(,ruby-here-doc-beg-re 0 (unless (ruby-singleton-class-p (match-beginning 0))
1603 'font-lock-string-face)) 1603 'font-lock-string-face))
1604 ;; variables 1604 ;; variables
1605 '("\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\(nil\\|self\\|true\\|false\\)\\>" 1605 '("\\(^\\|[^.@$]\\|\\.\\.\\)\\_<\\(nil\\|self\\|true\\|false\\)\\>"
1606 2 font-lock-variable-name-face) 1606 2 font-lock-variable-name-face)
1607 ;; symbols 1607 ;; symbols
1608 '("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" 1608 '("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)"
@@ -1613,8 +1613,8 @@ See `font-lock-syntax-table'.")
1613 '("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+" 1613 '("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+"
1614 0 font-lock-variable-name-face) 1614 0 font-lock-variable-name-face)
1615 ;; constants 1615 ;; constants
1616 '("\\(^\\|[^_]\\)\\b\\([A-Z]+\\(\\w\\|_\\)*\\)" 1616 '("\\_<\\([A-Z]+\\(\\w\\|_\\)*\\)"
1617 2 font-lock-type-face) 1617 1 font-lock-type-face)
1618 '("\\(^\\s *\\|[\[\{\(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" 2 font-lock-constant-face) 1618 '("\\(^\\s *\\|[\[\{\(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" 2 font-lock-constant-face)
1619 ;; expression expansion 1619 ;; expression expansion
1620 '(ruby-match-expression-expansion 1620 '(ruby-match-expression-expansion