Add prelude-kill-whole-line

This commit is contained in:
Bozhidar Batsov 2013-04-09 15:18:08 +03:00
parent 29f5157bf3
commit ff9bd27831
2 changed files with 9 additions and 0 deletions

View file

@ -109,6 +109,13 @@ Position the cursor at its beginning, according to the current mode."
(forward-line -1)
(indent-according-to-mode))
(defun prelude-kill-whole-line (&optional arg)
"A simple wrapper around command `kill-whole-line' that respects indentation.
Passes ARG to command `kill-whole-line' when provided."
(interactive "P")
(kill-whole-line arg)
(back-to-indentation))
(defun prelude-indent-buffer ()
"Indent the currently visited buffer."
(interactive)

View file

@ -80,6 +80,8 @@
(kill-line 0)
(indent-according-to-mode)))
(global-set-key [remap kill-whole-line] 'prelude-kill-whole-line)
;; Activate occur easily inside isearch
(define-key isearch-mode-map (kbd "C-o")
(lambda () (interactive)