]> git.eshelyaron.com Git - emacs.git/commitdiff
* progmodes/ruby-mode.el (ruby-font-lock-keywords): Use "\\_<" instead
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 27 Jan 2013 22:32:11 +0000 (02:32 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 27 Jan 2013 22:32:11 +0000 (02:32 +0400)
  of "\\b".  Remove some checks made superfluous as a result.

lisp/ChangeLog
lisp/progmodes/ruby-mode.el

index 610a237b05038208996cc4b8658969342927d49e..cc30dc82341e5e26cf64ef8ba2fec8e34e59c421 100644 (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
index a42a66dfa87c3ae198f03d4819f45246a7cc2880..989c00365a0037349b9a07f6995a85109be6f94f 100644 (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