Wrap kill-region with defadvice from crux (#1035)
This commit is contained in:
parent
e8a0f5e833
commit
7551ed6e33
1 changed files with 1 additions and 6 deletions
|
@ -197,12 +197,7 @@ The body of the advice is in BODY."
|
||||||
;; note - this should be after volatile-highlights is required
|
;; note - this should be after volatile-highlights is required
|
||||||
;; add the ability to cut the current line, without marking it
|
;; add the ability to cut the current line, without marking it
|
||||||
(require 'rect)
|
(require 'rect)
|
||||||
(defadvice kill-region (before smart-cut activate compile)
|
(crux-with-region-or-line kill-region)
|
||||||
"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)))))
|
|
||||||
|
|
||||||
;; tramp, for sudo access
|
;; tramp, for sudo access
|
||||||
(require 'tramp)
|
(require 'tramp)
|
||||||
|
|
Loading…
Reference in a new issue