Skip to content

@vfaronov /gist:6156902
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
(fset 'vf-orig-kill-region (symbol-function 'kill-region))
(defadvice kill-word (before vf-before-kill-word ())
(fset 'kill-region (symbol-function 'delete-region)))
(defadvice kill-word (after vf-after-kill-word ())
(fset 'kill-region (symbol-function 'vf-orig-kill-region)))
(ad-activate 'kill-word)
(defadvice backward-kill-word (before vf-before-backward-kill-word ())
(fset 'kill-region (symbol-function 'delete-region)))
(defadvice backward-kill-word (after vf-after-backward-kill-word ())
(fset 'kill-region (symbol-function 'vf-orig-kill-region)))
(ad-activate 'backward-kill-word)
(defadvice delete-char (before vf-before-delete-char ())
(fset 'kill-region (symbol-function 'delete-region)))
(defadvice delete-char (after vf-after-delete-char ())
(fset 'kill-region (symbol-function 'vf-orig-kill-region)))
(ad-activate 'delete-char)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.