Advertisement
mark-naylor-1701

emacs delete word commands

Nov 2nd, 2024
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.37 KB | None | 0 0
  1. (defun delete-word (word-count)
  2.   "Equivalent to `kill-word'. Characters do not get sent to the kill-ring."
  3.   (interactive "p")
  4.   (delete-region (point) (progn (forward-word word-count) (point))))
  5.  
  6. (defun backward-delete-word (word-count)
  7.   "Equivalent to `backward-kill-word'. Characters do not get sent to the kill-ring."
  8.   (interactive "p")
  9.   (delete-word (- word-count)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement