[Fix #623] Restored kill-region defadvice
When no region selected `C-w` kills current line
This commit is contained in:
parent
72d11bdddd
commit
daf52c2b0a
1 changed files with 9 additions and 0 deletions
|
@ -189,6 +189,15 @@ The body of the advice is in BODY."
|
||||||
(volatile-highlights-mode t)
|
(volatile-highlights-mode t)
|
||||||
(diminish 'volatile-highlights-mode)
|
(diminish 'volatile-highlights-mode)
|
||||||
|
|
||||||
|
;; note - this should be after volatile-highlights is required
|
||||||
|
;; add the ability to cut the current line, without marking it
|
||||||
|
(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))
|
||||||
|
(list (line-beginning-position)
|
||||||
|
(line-beginning-position 2)))))
|
||||||
|
|
||||||
;; tramp, for sudo access
|
;; tramp, for sudo access
|
||||||
(require 'tramp)
|
(require 'tramp)
|
||||||
;; keep in mind known issues with zsh - see emacs wiki
|
;; keep in mind known issues with zsh - see emacs wiki
|
||||||
|
|
Loading…
Reference in a new issue