aboutsummaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/lisp/my/my-editing.el16
1 files changed, 6 insertions, 10 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-editing.el b/emacs/.emacs.d/lisp/my/my-editing.el
index 0b953b3..6bbde62 100644
--- a/emacs/.emacs.d/lisp/my/my-editing.el
+++ b/emacs/.emacs.d/lisp/my/my-editing.el
@@ -136,16 +136,11 @@ current line or active region without adding it to the `kill-ring'."
(message "Copied current %s" message))))
;;;###autoload
-(defun my-new-line-below (&optional arg)
- "Create an empty line below the current one.
-Move the point to the absolute beginning. Adapt indentation by
-passing optional prefix ARG (\\[universal-argument]). Also see
-`my-new-line-above'."
- (interactive "P")
+(defun my-new-line-below ()
+ "Open a new line below and indent."
+ (interactive)
(end-of-line)
- (if arg
- (newline-and-indent)
- (newline)))
+ (newline-and-indent))
;;;###autoload
(defun my-new-line-above-or-below (&optional arg)
@@ -160,7 +155,8 @@ by passing optional prefix ARG (\\[universal-argument])."
(progn
(beginning-of-line)
(newline)
- (forward-line -1))
+ (forward-line -1)
+ (indent-according-to-mode))
(forward-line -1)
(my-new-line-below))))