Minor refactoring

This commit is contained in:
Bozhidar Batsov 2013-03-27 12:13:24 +02:00
parent b46ec6dad3
commit 3d24efbb65
2 changed files with 3 additions and 5 deletions

View file

@ -79,14 +79,12 @@
(indent-rigidly (point-min) (point-max) arg)
(clipboard-kill-ring-save (point-min) (point-max)))))
(defun prelude-insert-empty-line ()
(defun prelude-smart-open-line ()
"Insert an empty line after the current line.
Position the cursor at its beginning, according to the current mode."
(interactive)
(move-end-of-line nil)
(open-line 1)
(forward-line 1)
(indent-according-to-mode))
(newline-and-indent))
(defun prelude-move-line-up ()
"Move up the current line."

View file

@ -38,7 +38,7 @@
(define-key map (kbd "C-c o") 'prelude-open-with)
(define-key map (kbd "C-c g") 'prelude-google)
;; mimic popular IDEs binding, note that it doesn't work in a terminal session
(define-key map [(shift return)] 'prelude-insert-empty-line)
(define-key map [(shift return)] 'prelude-smart-open-line)
(define-key map [(control shift up)] 'prelude-move-line-up)
(define-key map [(control shift down)] 'prelude-move-line-down)
(define-key map (kbd "C-c n") 'prelude-cleanup-buffer)