Skip to content

Instantly share code, notes, and snippets.

@PuercoPop
Created September 28, 2012 02:21
Show Gist options
  • Save PuercoPop/3797605 to your computer and use it in GitHub Desktop.
Save PuercoPop/3797605 to your computer and use it in GitHub Desktop.
(defadvice zap-to-char (after zap-up-to-char-advice (arg char) activate)
"Kill up to the ARG'th occurence of CHAR, and leave CHAR. If
you are deleting forward, the CHAR is replaced and the point is
put before CHAR"
(insert char)
(if (< 0 arg) (forward-char -1)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment