Add prelude-indent-defun
This commit is contained in:
parent
a3d8809a5c
commit
56f9679ea2
2 changed files with 8 additions and 0 deletions
|
@ -116,6 +116,13 @@ Position the cursor at its beginning, according to the current mode."
|
|||
(prelude-indent-buffer)
|
||||
(message "Indented buffer.")))))
|
||||
|
||||
(defun prelude-indent-defun ()
|
||||
"Indent the current defun."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(mark-defun)
|
||||
(indent-region (region-beginning) (region-end))))
|
||||
|
||||
(defun prelude-annotate-todo ()
|
||||
"Put fringe marker on TODO: lines in the curent buffer."
|
||||
(interactive)
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
(define-key map (kbd "C-c n") 'prelude-cleanup-buffer)
|
||||
(define-key map (kbd "C-c f") 'prelude-recentf-ido-find-file)
|
||||
(define-key map (kbd "C-M-\\") 'prelude-indent-region-or-buffer)
|
||||
(define-key map (kbd "C-M-z") 'indent-defun)
|
||||
(define-key map (kbd "C-c u") 'prelude-view-url)
|
||||
(define-key map (kbd "C-c e") 'prelude-eval-and-replace)
|
||||
(define-key map (kbd "C-c s") 'prelude-swap-windows)
|
||||
|
|
Loading…
Reference in a new issue