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:
parent
ca52e3be5c
commit
33ede4d01c
2 changed files with 10 additions and 3 deletions
|
@ -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>
|
Tue Jan 12 09:58:03 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* hash.c: need to include errno.h for EINVAL.
|
* hash.c: need to include errno.h for EINVAL.
|
||||||
|
|
|
@ -121,13 +121,15 @@
|
||||||
(match-string 6)))))
|
(match-string 6)))))
|
||||||
|
|
||||||
(defun ruby-here-doc-beg-match ()
|
(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 "<<"
|
(concat "<<"
|
||||||
(let ((match (match-string 1)))
|
(let ((match (match-string 1)))
|
||||||
(if (and match (> (length match) 0))
|
(if (and match (> (length match) 0))
|
||||||
(concat "\\(?:-\\([\"']?\\)\\|\\([\"']\\)" (match-string 1) "\\)"
|
(concat "\\(?:-\\([\"']?\\)\\|\\([\"']\\)" (match-string 1) "\\)"
|
||||||
contents "\\b\\(\\1\\|\\2\\)")
|
contents "\\(\\1\\|\\2\\)")
|
||||||
(concat "-?\\([\"']\\|\\)" contents "\\b\\1"))))))
|
(concat "-?\\([\"']\\|\\)" contents "\\1"))))))
|
||||||
|
|
||||||
(defconst ruby-delimiter
|
(defconst ruby-delimiter
|
||||||
(concat "[?$/%(){}#\"'`.:]\\|<<\\|\\[\\|\\]\\|\\<\\("
|
(concat "[?$/%(){}#\"'`.:]\\|<<\\|\\[\\|\\]\\|\\<\\("
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue