Only kill a line if it looks like an action line.

This commit is contained in:
Phil Jackson 2010-05-31 16:50:02 +01:00
parent 480f0726d0
commit 0244b8b1b1

View file

@ -97,14 +97,15 @@ current line down."
(defun rebase-mode-kill-line ()
"Kill the current action line."
(interactive)
(let* ((buffer-read-only nil)
(region (list (point-at-bol)
(progn (forward-line)
(point-at-bol))))
;; might be handy to let the user know what went
;; somehow... sometime
(text (apply 'buffer-substring region)))
(apply 'kill-region region)))
(when (rebase-mode-looking-at-action)
(let* ((buffer-read-only nil)
(region (list (point-at-bol)
(progn (forward-line)
(point-at-bol))))
;; might be handy to let the user know what went
;; somehow... sometime
(text (apply 'buffer-substring region)))
(apply 'kill-region region))))
(define-generic-mode 'rebase-mode
'("#")