changeset 103462:3c0923fbcb01

* progmodes/ruby-mode.el (ruby-parse-partial, ruby-font-lock-keywords): Support overloadable negative operators (Bug#3587).
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 17 Jun 2009 15:16:17 +0000
parents 145036a4bf0d
children 6d3359edbf15
files lisp/ChangeLog lisp/progmodes/ruby-mode.el
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Jun 17 15:06:25 2009 +0000
+++ b/lisp/ChangeLog	Wed Jun 17 15:16:17 2009 +0000
@@ -1,3 +1,9 @@
+2009-06-17  Akinori MUSHA  <knu@iDaemons.org>  (tiny change)
+
+	* progmodes/ruby-mode.el (ruby-parse-partial)
+	(ruby-font-lock-keywords): Support overloadable negative
+	operators (Bug#3587).
+
 2009-06-17  Tiago Saboga  <tiagosaboga@gmail.com>  (tiny change)
 
 	* files.el (save-some-buffers-action-alist): Fix last
--- a/lisp/progmodes/ruby-mode.el	Wed Jun 17 15:06:25 2009 +0000
+++ b/lisp/progmodes/ruby-mode.el	Wed Jun 17 15:16:17 2009 +0000
@@ -613,7 +613,7 @@
        ((looking-at ":\\(['\"]\\)")
         (goto-char (match-beginning 1))
         (ruby-forward-string (buffer-substring (match-beginning 1) (match-end 1)) end))
-       ((looking-at ":\\([-,.+*/%&|^~<>]=?\\|===?\\|<=>\\)")
+       ((looking-at ":\\([-,.+*/%&|^~<>]=?\\|===?\\|<=>\\|![~=]?\\)")
         (goto-char (match-end 0)))
        ((looking-at ":\\([a-zA-Z_][a-zA-Z_0-9]*[!?=]?\\)?")
         (goto-char (match-end 0)))
@@ -1362,7 +1362,7 @@
    '("\\(^\\|[^_]\\)\\b\\([A-Z]+\\(\\w\\|_\\)*\\)"
      2 font-lock-type-face)
    ;; symbols
-   '("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|\\[\\]=?\\|\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)"
+   '("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)"
      2 font-lock-reference-face)
    ;; expression expansion
    '("#\\({[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\|\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+\\)"