From 496abe17be5a8d6f95506b98de7504b52950b4de Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Mon, 8 Apr 2013 15:06:12 +0200 Subject: [PATCH] Add support for electric indent mode. --- drag-stuff.el | 3 ++- features/conflicting-modes.feature | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/drag-stuff.el b/drag-stuff.el index 05b90e2..a6d7263 100644 --- a/drag-stuff.el +++ b/drag-stuff.el @@ -96,7 +96,8 @@ (defun drag-stuff-down (arg) "Drag stuff ARG lines down." (interactive "p") - (let ((auto-fill-function nil)) + (let ((auto-fill-function nil) + (electric-indent-mode nil)) (if mark-active (drag-stuff-lines-down arg) (drag-stuff-line-down arg)))) diff --git a/features/conflicting-modes.feature b/features/conflicting-modes.feature index 9624315..0922512 100644 --- a/features/conflicting-modes.feature +++ b/features/conflicting-modes.feature @@ -22,3 +22,22 @@ Feature: Drag Stuff ;; ... )) """ + + Scenario: Electric indent mode + Given I insert: + """ + class Foo + end + def bar + end + """ + And I turn on drag-stuff + And I turn on electric-indent-mode + And I drag line "2" down + Then I should see: + """ + class Foo + def bar + end + end + """