From 1c6d48d2e3d893e5111e23ad9c7428bd7f575e15 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sat, 7 Apr 2012 11:30:21 +0100 Subject: [PATCH] Add workaround for missing ruby-insert-end function from ruby-mode --- mode-customizations/ruby-mode.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mode-customizations/ruby-mode.el b/mode-customizations/ruby-mode.el index ff45716..e0f88bb 100644 --- a/mode-customizations/ruby-mode.el +++ b/mode-customizations/ruby-mode.el @@ -46,6 +46,15 @@ (define-key ruby-mode-map (kbd "C-c C-b") 'eproject-ibuffer))) +;; Workaround for missing method in ruby-mode.el +;; See: https://gist.github.com/1213051 +(defun ruby-insert-end () + "Insert \"end\" at point and reindent current line." + (interactive) + (insert "end") + (ruby-indent-line t) + (end-of-line)) + ;; Yasnippet workaround for ruby-electric-mode ;; See: http://code.google.com/p/yasnippet/issues/detail?id=71 (defun yas/advise-indent-function (function-symbol)