Add prefix arg to prelude-smart-open-line
With a prefix arg the command will invoke prelude-smart-open-line-above
This commit is contained in:
parent
9116d5a0c8
commit
f76aab7491
1 changed files with 10 additions and 5 deletions
|
@ -90,12 +90,17 @@ Position the cursor at it's beginning, according to the current mode."
|
||||||
(forward-line -1)
|
(forward-line -1)
|
||||||
(indent-according-to-mode))
|
(indent-according-to-mode))
|
||||||
|
|
||||||
(defun prelude-smart-open-line ()
|
(defun prelude-smart-open-line (arg)
|
||||||
"Insert an empty line after the current line.
|
"Insert an empty line after the current line.
|
||||||
Position the cursor at its beginning, according to the current mode."
|
Position the cursor at its beginning, according to the current mode.
|
||||||
(interactive)
|
|
||||||
|
With a prefix ARG open line above the current line."
|
||||||
|
(interactive "P")
|
||||||
|
(if arg
|
||||||
|
(prelude-smart-open-line-above)
|
||||||
|
(progn
|
||||||
(move-end-of-line nil)
|
(move-end-of-line nil)
|
||||||
(newline-and-indent))
|
(newline-and-indent))))
|
||||||
|
|
||||||
(defun prelude-top-join-line ()
|
(defun prelude-top-join-line ()
|
||||||
"Join the current line with the line beneath it."
|
"Join the current line with the line beneath it."
|
||||||
|
|
Loading…
Reference in a new issue