public
Created

  • Download Gist
gistfile1.el
Emacs Lisp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
(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)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.