Added and mapped `rebase-mode-kill-line'.

This commit is contained in:
Phil Jackson 2010-05-31 16:21:28 +01:00
parent aad24fa54e
commit 1f56562935

View file

@ -40,6 +40,15 @@
(next-line 1) (next-line 1)
(transpose-lines 1) (transpose-lines 1)
(previous-line 1)) (previous-line 1))
(defun rebase-mode-kill-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
(text (apply 'buffer-substring region)))
(apply 'kill-region region)))
(defvar rebase-mode-map (defvar rebase-mode-map
(let ((map (make-sparse-keymap))) (let ((map (make-sparse-keymap)))
@ -56,6 +65,7 @@
(interactive) (interactive)
(let ((buffer-read-only nil)) (let ((buffer-read-only nil))
(kill-region (point-at-bol) (point-at-eol))))) (kill-region (point-at-bol) (point-at-eol)))))
(define-key map (kbd "k") 'rebase-mode-kill-line)
(dolist (key-fun '(("p" . "pick") (dolist (key-fun '(("p" . "pick")
("r" . "reword") ("r" . "reword")
("e" . "edit") ("e" . "edit")