[前][次][番号順一覧][スレッド一覧]

ruby-changes:43239

From: nobu <ko1@a...>
Date: Tue, 7 Jun 2016 17:57:41 +0900 (JST)
Subject: [ruby-changes:43239] nobu:r55313 (trunk): ruby-additional.el: adjust heredoc line number

nobu	2016-06-07 17:57:37 +0900 (Tue, 07 Jun 2016)

  New Revision: 55313

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55313

  Log:
    ruby-additional.el: adjust heredoc line number
    
    * misc/ruby-additional.el (ruby-insert-heredoc-code-block): insert
      a newline adjust the line number for "begin" line.

  Modified files:
    trunk/misc/ruby-additional.el
Index: misc/ruby-additional.el
===================================================================
--- misc/ruby-additional.el	(revision 55312)
+++ misc/ruby-additional.el	(revision 55313)
@@ -162,11 +162,11 @@ Emacs to Ruby." https://github.com/ruby/ruby/blob/trunk/misc/ruby-additional.el#L162
        "Insert indented here document code block"
        (interactive "P")
        (let ((c (if arg "~" "-")))
-	 (insert "\"#{<<" c "begin}#{<<" c "\"end;\"}\""))
+	 (insert "\"#{<<" c "\"begin\;\"}\\n#{<<" c "\"end;\"}\""))
        (end-of-line)
        (if (eobp) (insert "\n") (forward-char))
        (indent-region (point)
-		      (progn (insert "begin\n" "end;\n") (point)))
+		      (progn (insert "begin;\n" "end;\n") (point)))
        (beginning-of-line 0))
      (define-key ruby-mode-map "\C-cH" 'ruby-insert-heredoc-code-block)
      ))

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]