aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my/my-editing.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/lisp/my/my-editing.el')
-rw-r--r--emacs/.emacs.d/lisp/my/my-editing.el22
1 files changed, 19 insertions, 3 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-editing.el b/emacs/.emacs.d/lisp/my/my-editing.el
index 47e33a3..940a338 100644
--- a/emacs/.emacs.d/lisp/my/my-editing.el
+++ b/emacs/.emacs.d/lisp/my/my-editing.el
@@ -3,9 +3,6 @@
;; Copyright (C) 2023 Free Software Foundation.
;; Author: Yuchen Pei <id@ypei.org>
-;; Protesilaos Stavrou <info@protesilaos.com>
-;; Stefan Monnier <monnier@iro.umontreal.ca>
-;; Maintainer: Yuchen Pei <id@ypei.org>
;; Package-Requires: ((emacs "28.2"))
;; This file is part of dotfiles.
@@ -336,6 +333,13 @@ Basically move the line up
(goto-line line)
(forward-char col)))
+(defun my-kill-line (&optional arg)
+ "Calls `my-kill-forward' or `kill-line' in case of prefix arg."
+ (interactive "P")
+ (if prefix-arg
+ (kill-line)
+ (my-kill-forward)))
+
(defun my-kill-forward ()
"Kill towards end of line, but not out of sexp."
(interactive)
@@ -354,6 +358,13 @@ Basically move the line up
(setq end (point)))
(kill-region (point) end))))
+(defun my-kill-line-backward (&optional arg)
+ "Calls `my-kill-backward' or `kill-line' with 0 in case of prefix arg."
+ (interactive "P")
+ (if prefix-arg
+ (kill-line 0)
+ (my-kill-backward)))
+
(defun my-kill-backward ()
"Kill towards beginning of line, but not out of sexp."
(interactive)
@@ -385,5 +396,10 @@ With an prefix-arg, copy the file name relative to project root."
(kill-new to-kill)
(message "Copied %s" to-kill)))
+(defun my-non-special-modes-setup ()
+ (setq indicate-empty-lines t)
+ (setq show-trailing-whitespace t)
+ )
+
(provide 'my-editing)
;;; my-editing.el ends here