summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-09-05 12:32:13 -0500
committerCraig Jennings <c@cjennings.net>2025-09-05 13:31:37 -0500
commit7959a8d921dd43679993ab11c120c21de9d2cce5 (patch)
tree9c36fcb8396f642d6f784b806a05ecbb2eefd48f /modules
parent9a64fe7f29289d074d3dd51f75ac1c2912cca22c (diff)
downloaddotemacs-7959a8d921dd43679993ab11c120c21de9d2cce5.tar.gz
dotemacs-7959a8d921dd43679993ab11c120c21de9d2cce5.zip
added cj/clear-to-end-of-buffer
Diffstat (limited to 'modules')
-rw-r--r--modules/custom-functions.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/custom-functions.el b/modules/custom-functions.el
index 3c910734..4de1f03a 100644
--- a/modules/custom-functions.el
+++ b/modules/custom-functions.el
@@ -222,7 +222,15 @@ Other key maps extend from this key map to hold categorized functions.")
(when file-path
(setq file-path (concat "file://" file-path))
(kill-new file-path)
- (message "Copied file link to kill ring: %s" file-path))))
+ (message "Copied file link to kill ring: %s" file-path))))
+
+
+(defun cj/clear-to-end-of-buffer ()
+ "Delete all text from point to the end of the current buffer.
+This does not save the deleted text in the kill ring."
+ (interactive)
+ (delete-region (point) (point-max)))
+
;; Buffer & file operations prefix and keymap
(define-prefix-command 'cj/buffer-and-file-map nil
@@ -231,6 +239,7 @@ Other key maps extend from this key map to hold categorized functions.")
(define-key cj/buffer-and-file-map "m" 'cj/move-buffer-and-file)
(define-key cj/buffer-and-file-map "r" 'cj/rename-buffer-and-file)
(define-key cj/buffer-and-file-map "d" 'cj/delete-buffer-and-file)
+(define-key cj/buffer-and-file-map "e" 'cj/clear-to-end-of-buffer)
(define-key cj/buffer-and-file-map "l" 'cj/copy-link-to-buffer-file)
;;; ---------------------- Whitespace Operations And Keymap ---------------------