Add prelude-kill-whole-line
This commit is contained in:
parent
29f5157bf3
commit
ff9bd27831
2 changed files with 9 additions and 0 deletions
|
@ -109,6 +109,13 @@ Position the cursor at its beginning, according to the current mode."
|
||||||
(forward-line -1)
|
(forward-line -1)
|
||||||
(indent-according-to-mode))
|
(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 ()
|
(defun prelude-indent-buffer ()
|
||||||
"Indent the currently visited buffer."
|
"Indent the currently visited buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
|
@ -80,6 +80,8 @@
|
||||||
(kill-line 0)
|
(kill-line 0)
|
||||||
(indent-according-to-mode)))
|
(indent-according-to-mode)))
|
||||||
|
|
||||||
|
(global-set-key [remap kill-whole-line] 'prelude-kill-whole-line)
|
||||||
|
|
||||||
;; Activate occur easily inside isearch
|
;; Activate occur easily inside isearch
|
||||||
(define-key isearch-mode-map (kbd "C-o")
|
(define-key isearch-mode-map (kbd "C-o")
|
||||||
(lambda () (interactive)
|
(lambda () (interactive)
|
||||||
|
|
Loading…
Reference in a new issue