From 7551ed6e33b1fced1c3cf81f66268dcaa76bb2cb Mon Sep 17 00:00:00 2001 From: Rahiel Kasim Date: Sun, 25 Sep 2016 06:58:06 +0200 Subject: [PATCH] Wrap kill-region with defadvice from crux (#1035) --- core/prelude-editor.el | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/core/prelude-editor.el b/core/prelude-editor.el index 7829e55..a6fb141 100644 --- a/core/prelude-editor.el +++ b/core/prelude-editor.el @@ -197,12 +197,7 @@ The body of the advice is in BODY." ;; note - this should be after volatile-highlights is required ;; add the ability to cut the current line, without marking it (require 'rect) -(defadvice kill-region (before smart-cut activate compile) - "When called interactively with no active region, kill a single line instead." - (interactive - (if mark-active (list (region-beginning) (region-end) rectangle-mark-mode) - (list (line-beginning-position) - (line-beginning-position 2))))) +(crux-with-region-or-line kill-region) ;; tramp, for sudo access (require 'tramp)