Skip to content

Commit

Permalink
Merge pull request bbatsov#761 from k1-hedayati/restore-kill-region-d…
Browse files Browse the repository at this point in the history
…efadvice

[Fix bbatsov#623] Restored kill-region defadvice
  • Loading branch information
bbatsov committed Dec 22, 2014
2 parents f19aeda + daf52c2 commit 76c2e99
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/prelude-editor.el
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,15 @@ The body of the advice is in BODY."
(volatile-highlights-mode t)
(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
(require 'tramp)
;; keep in mind known issues with zsh - see emacs wiki
Expand Down

0 comments on commit 76c2e99

Please sign in to comment.