[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r116850: Match special globals in Ruby better
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] emacs-24 r116850: Match special globals in Ruby better |
Date: |
Mon, 24 Mar 2014 08:54:06 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116850
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17057
committer: Dmitry Gutov <address@hidden>
branch nick: emacs-24
timestamp: Mon 2014-03-24 10:53:56 +0200
message:
Match special globals in Ruby better
* lisp/progmodes/ruby-mode.el (ruby-expression-expansion-re):
Match special global variables without curlies, too.
(ruby-font-lock-keywords): Simplify the matcher for special global
variables. Don't require a non-word character after the variable.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/ruby-mode.el
rubymode.el-20091113204419-o5vbwnq5f7feedwu-8804
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-03-23 22:30:47 +0000
+++ b/lisp/ChangeLog 2014-03-24 08:53:56 +0000
@@ -1,3 +1,11 @@
+2014-03-24 Dmitry Gutov <address@hidden>
+
+ * progmodes/ruby-mode.el (ruby-expression-expansion-re):
+ Match special global variables without curlies, too.
+ (ruby-font-lock-keywords): Simplify the matcher for special global
+ variables. Don't require a non-word character after the variable.
+ (Bug#17057)
+
2014-03-23 Stefan Monnier <address@hidden>
* simple.el (redisplay-highlight-region-function): Increase priority of
=== modified file 'lisp/progmodes/ruby-mode.el'
--- a/lisp/progmodes/ruby-mode.el 2014-03-21 04:26:39 +0000
+++ b/lisp/progmodes/ruby-mode.el 2014-03-24 08:53:56 +0000
@@ -106,7 +106,7 @@
"Regexp to match the beginning of a heredoc.")
(defconst ruby-expression-expansion-re
-
"\\(?:[^\\]\\|\\=\\)\\(\\\\\\\\\\)*\\(#\\({[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\|\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+\\)\\)"))
+
"\\(?:[^\\]\\|\\=\\)\\(\\\\\\\\\\)*\\(#\\({[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\|\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+\\|\\$[^a-zA-Z
\n]\\)\\)"))
(defun ruby-here-doc-end-match ()
"Return a regexp to find the end of a heredoc.
@@ -2113,8 +2113,8 @@
("\\(^\\|[^:]\\)\\(:\\(address@hidden|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)"
2 font-lock-constant-face)
;; Variables.
- ("\\(\\$\\([^a-zA-Z0-9 \n]\\|[0-9]\\)\\)\\W"
- 1 font-lock-variable-name-face)
+ ("\\$[^a-zA-Z \n]"
+ 0 font-lock-variable-name-face)
("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+"
0 font-lock-variable-name-face)
;; Constants.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r116850: Match special globals in Ruby better,
Dmitry Gutov <=