1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* misc/ruby-mode.el (ruby-here-doc-beg-match): fix for here-doc

which ends with an underscore.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-01-12 03:49:42 +00:00
parent ca52e3be5c
commit 33ede4d01c
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Tue Jan 12 12:49:39 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* misc/ruby-mode.el (ruby-here-doc-beg-match): fix for here-doc
which ends with an underscore.
Tue Jan 12 09:58:03 2010 NAKAMURA Usaku <usa@ruby-lang.org>
* hash.c: need to include errno.h for EINVAL.

View file

@ -121,13 +121,15 @@
(match-string 6)))))
(defun ruby-here-doc-beg-match ()
(let ((contents (regexp-quote (concat (match-string 2) (match-string 3)))))
(let ((contents (concat
(regexp-quote (concat (match-string 2) (match-string 3)))
(if (string= (match-string 3) "_") "\\B" "\\b"))))
(concat "<<"
(let ((match (match-string 1)))
(if (and match (> (length match) 0))
(concat "\\(?:-\\([\"']?\\)\\|\\([\"']\\)" (match-string 1) "\\)"
contents "\\b\\(\\1\\|\\2\\)")
(concat "-?\\([\"']\\|\\)" contents "\\b\\1"))))))
contents "\\(\\1\\|\\2\\)")
(concat "-?\\([\"']\\|\\)" contents "\\1"))))))
(defconst ruby-delimiter
(concat "[?$/%(){}#\"'`.:]\\|<<\\|\\[\\|\\]\\|\\<\\("