From 11473529433b4b17529e6ef29f4299f41a4f6fed Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 17 Jun 2009 15:16:17 +0000 Subject: [PATCH] * progmodes/ruby-mode.el (ruby-parse-partial, ruby-font-lock-keywords): Support overloadable negative operators (Bug#3587). --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/ruby-mode.el | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c5dd0e621c7..3519690d562 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2009-06-17 Akinori MUSHA (tiny change) + + * progmodes/ruby-mode.el (ruby-parse-partial) + (ruby-font-lock-keywords): Support overloadable negative + operators (Bug#3587). + 2009-06-17 Tiago Saboga (tiny change) * files.el (save-some-buffers-action-alist): Fix last diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index d9718e6252f..4807d64f053 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -613,7 +613,7 @@ and `\\' when preceded by `?'." ((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 @@ See `font-lock-syntax-table'.") '("\\(^\\|[^_]\\)\\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\\|_\\)+\\)" -- 2.39.2