diff options
| author | Dmitry Gutov | 2012-11-13 07:07:09 +0400 |
|---|---|---|
| committer | Dmitry Gutov | 2012-11-13 07:07:09 +0400 |
| commit | f178c32dd1f7dd6172e3088a49ebd6d36cd8ce0e (patch) | |
| tree | d3d47b97e0d1f417e4819295262d345b4c9410a4 /lisp | |
| parent | 413d4689c0c3f616856615ac7b8bb047c5f2febd (diff) | |
| download | emacs-f178c32dd1f7dd6172e3088a49ebd6d36cd8ce0e.tar.gz emacs-f178c32dd1f7dd6172e3088a49ebd6d36cd8ce0e.zip | |
* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Never
font-lock the beginning of singleton class as heredoc.
* test/automated/ruby-mode-tests.el (ruby-heredoc-font-lock)
(ruby-singleton-class-no-heredoc-font-lock): New tests.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 92f3343db64..d04c42da4f1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -14,6 +14,11 @@ | |||
| 14 | (advice-add): Use them. | 14 | (advice-add): Use them. |
| 15 | (advice-member-p): Correctly handle macros. | 15 | (advice-member-p): Correctly handle macros. |
| 16 | 16 | ||
| 17 | 2012-11-13 Dmitry Gutov <dgutov@yandex.ru> | ||
| 18 | |||
| 19 | * progmodes/ruby-mode.el (ruby-font-lock-keywords): Never | ||
| 20 | font-lock the beginning of singleton class as heredoc. | ||
| 21 | |||
| 17 | 2012-11-13 Stefan Monnier <monnier@iro.umontreal.ca> | 22 | 2012-11-13 Stefan Monnier <monnier@iro.umontreal.ca> |
| 18 | 23 | ||
| 19 | * emacs-lisp/gv.el (gv-define-simple-setter): One more fix (bug#12871). | 24 | * emacs-lisp/gv.el (gv-define-simple-setter): One more fix (bug#12871). |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 67f25eda288..9d2c6fa51f7 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -1551,7 +1551,8 @@ See `font-lock-syntax-table'.") | |||
| 1551 | ruby-keyword-end-re) | 1551 | ruby-keyword-end-re) |
| 1552 | 2) | 1552 | 2) |
| 1553 | ;; here-doc beginnings | 1553 | ;; here-doc beginnings |
| 1554 | (list ruby-here-doc-beg-re 0 'font-lock-string-face) | 1554 | `(,ruby-here-doc-beg-re 0 (unless (ruby-singleton-class-p (match-beginning 0)) |
| 1555 | 'font-lock-string-face)) | ||
| 1555 | ;; variables | 1556 | ;; variables |
| 1556 | '("\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\(nil\\|self\\|true\\|false\\)\\>" | 1557 | '("\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\(nil\\|self\\|true\\|false\\)\\>" |
| 1557 | 2 font-lock-variable-name-face) | 1558 | 2 font-lock-variable-name-face) |