[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109941: * lisp/progmodes/ruby-mode.e
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109941: * lisp/progmodes/ruby-mode.el (ruby-match-expression-expansion): Only |
Date: |
Sat, 08 Sep 2012 19:13:14 +0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109941
committer: Dmitry Gutov <address@hidden>
branch nick: trunk
timestamp: Sat 2012-09-08 19:13:14 +0400
message:
* lisp/progmodes/ruby-mode.el (ruby-match-expression-expansion): Only
fail when reached LIMIT.
modified:
lisp/ChangeLog
lisp/progmodes/ruby-mode.el
test/automated/ruby-mode-tests.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-09-08 14:48:26 +0000
+++ b/lisp/ChangeLog 2012-09-08 15:13:14 +0000
@@ -1,3 +1,8 @@
+2012-09-08 Dmitry Gutov <address@hidden>
+
+ * progmodes/ruby-mode.el (ruby-match-expression-expansion): Only
+ fail when reached LIMIT.
+
2012-09-08 Chong Yidong <address@hidden>
* dired.el (dired-mode-map): Don't bind M-=.
=== modified file 'lisp/progmodes/ruby-mode.el'
--- a/lisp/progmodes/ruby-mode.el 2012-09-07 05:06:05 +0000
+++ b/lisp/progmodes/ruby-mode.el 2012-09-08 15:13:14 +0000
@@ -1549,7 +1549,9 @@
(defun ruby-match-expression-expansion (limit)
(when (re-search-forward
"[^\\]\\(\\\\\\\\\\)*\\(#\\({[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\|\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+\\)\\)"
limit 'move)
- (ruby-in-ppss-context-p 'string)))
+ (or (ruby-in-ppss-context-p 'string)
+ (and (< (point) limit)
+ (ruby-match-expression-expansion limit)))))
;;;###autoload
(define-derived-mode ruby-mode prog-mode "Ruby"
=== modified file 'test/automated/ruby-mode-tests.el'
--- a/test/automated/ruby-mode-tests.el 2012-09-07 04:15:56 +0000
+++ b/test/automated/ruby-mode-tests.el 2012-09-08 15:13:14 +0000
@@ -237,10 +237,12 @@
'font-lock-variable-name-face)
(ruby-assert-face "\"This is \\#{no interpolation} despite the #\""
15 'font-lock-string-face)
- (ruby-assert-face "address@hidden, not ruby code" 3 'font-lock-comment-face)
- (ruby-assert-state "address@hidden, not ruby code" 4 t)
+ (ruby-assert-face "address@hidden, not ruby code" 5 'font-lock-comment-face)
+ (ruby-assert-state "address@hidden, not ruby code" 4 t)
(ruby-assert-face "# A comment cannot have #{an interpolation} in it"
- 30 'font-lock-comment-face))
+ 30 'font-lock-comment-face)
+ (ruby-assert-face "# #{comment}\n \"#{interpolation}\"" 16
+ 'font-lock-variable-name-face))
(provide 'ruby-mode-tests)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109941: * lisp/progmodes/ruby-mode.el (ruby-match-expression-expansion): Only,
Dmitry Gutov <=