From af513e5421a8454bf08fe30da07b802fc00998cd Mon Sep 17 00:00:00 2001 From: Alexander Kjeldaas Date: Fri, 12 Sep 2014 11:19:36 +0200 Subject: [PATCH] Tab not working? I couldn't get shm/tab to work properly. (this edit is done using the github editor, indentation might be wrong). --- elisp/shm.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/elisp/shm.el b/elisp/shm.el index cac6f14..e6388e8 100644 --- a/elisp/shm.el +++ b/elisp/shm.el @@ -225,8 +225,12 @@ state that will hopefully be garbage collected." slot." (interactive) (cond - ((save-excursion (goto-char (line-beginning-position)) - (looking-at "^[ ]*$")) + ((save-excursion + (save-restriction + (let ((n (line-beginning-position))) + (narrow-to-region n (point)) + (goto-char n) + (looking-at "^[ ]*$")))) (shm/simple-indent)) (t (shm/jump-to-slot))))