Added and mapped `rebase-mode-kill-line'.
This commit is contained in:
parent
aad24fa54e
commit
1f56562935
1 changed files with 10 additions and 0 deletions
|
@ -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")
|
||||||
|
|
Loading…
Reference in a new issue