emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111610: * progmodes/ruby-mode.el (ru


From: Dmitry Gutov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111610: * progmodes/ruby-mode.el (ruby-font-lock-keywords): Use "\\_<" instead
Date: Mon, 28 Jan 2013 02:32:11 +0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111610
committer: Dmitry Gutov <address@hidden>
branch nick: trunk
timestamp: Mon 2013-01-28 02:32:11 +0400
message:
  * progmodes/ruby-mode.el (ruby-font-lock-keywords): Use "\\_<" instead
    of "\\b".  Remove some checks made superfluous as a result.
modified:
  lisp/ChangeLog
  lisp/progmodes/ruby-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-01-27 10:43:33 +0000
+++ b/lisp/ChangeLog    2013-01-27 22:32:11 +0000
@@ -1,3 +1,13 @@
+2013-01-27  Dmitry Gutov  <address@hidden>
+
+       * progmodes/ruby-mode.el (ruby-font-lock-keywords): Remove some
+       checks made superfluous by the \_< operator.
+
+2013-01-27  Nobuyoshi Nakada  <address@hidden>
+
+       * progmodes/ruby-mode.el (ruby-font-lock-keywords): Use "\\_<"
+       instead of "\\b".
+
 2013-01-27  Michael Albinus  <address@hidden>
 
        * autorevert.el (auto-revert-handler): Notifications which result

=== modified file 'lisp/progmodes/ruby-mode.el'
--- a/lisp/progmodes/ruby-mode.el       2013-01-02 16:13:04 +0000
+++ b/lisp/progmodes/ruby-mode.el       2013-01-27 22:32:11 +0000
@@ -1552,7 +1552,7 @@
      1 font-lock-function-name-face)
    ;; keywords
    (cons (concat
-          "\\(^\\|[^_:address@hidden|\\.\\.\\)\\b\\(defined\\?\\|"
+          "\\(^\\|address@hidden|\\.\\.\\)\\_<\\(defined\\?\\|"
           (regexp-opt
            '("alias_method"
              "alias"
@@ -1602,7 +1602,7 @@
    `(,ruby-here-doc-beg-re 0 (unless (ruby-singleton-class-p (match-beginning 
0))
                                'font-lock-string-face))
    ;; variables
-   '("\\(^\\|[^_:address@hidden|\\.\\.\\)\\b\\(nil\\|self\\|true\\|false\\)\\>"
+   '("\\(^\\|address@hidden|\\.\\.\\)\\_<\\(nil\\|self\\|true\\|false\\)\\>"
      2 font-lock-variable-name-face)
    ;; symbols
    
'("\\(^\\|[^:]\\)\\(:\\(address@hidden|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)"
@@ -1613,8 +1613,8 @@
    '("\\(\\$\\|@\\|@@\\)\\(\\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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]