diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-12 03:49:42 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-12 03:49:42 +0000 |
commit | 6c8ba69ebee3803ae7a0d3e8f81362079a9952cf (patch) | |
tree | e467da0f205f129196eff6350d3cc8f4fad7b3d0 /misc/ruby-mode.el | |
parent | 50c99dc9c730ed6554cd75da84976b72f6f36be7 (diff) |
* 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/branches/ruby_1_8@26294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc/ruby-mode.el')
-rw-r--r-- | misc/ruby-mode.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index 09b0e63065..85ad8e4ee8 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -80,13 +80,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 "[?$/%(){}#\"'`.:]\\|<<\\|\\[\\|\\]\\|\\<\\(" |