SHARE
    TWEET
    mark-naylor-1701

    emacs delete words

    Sep 30th, 2023 (edited)
    3,185
    0
    Never
    Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
    Lisp 0.53 KB | None | 0 0
    1. ;; Functions that delete words without sending them to the kill ring.
    2. (defun delete-word (arg)
    3. "Equivalent to `kill-word'. Characters do not get sent to the kill-ring."
    4. (interactive "p")
    5. (delete-region (point) (progn (forward-word arg) (point))))
    6. (defun backward-delete-word (arg)
    7. "Equivalent to `backward-kill-word'. Characters do not get sent to the kill-ring."
    8. (interactive "p")
    9. (delete-word (- arg)))
    10. (global-set-key (kbd "M-D") #'delete-word)
    11. (global-set-key (kbd "M-S-<backspace>") #'backward-delete-word)
    Advertisement
    Add Comment
    Please, Sign In to add comment
    Public Pastes
    We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
    Not a member of Pastebin yet?
    Sign Up, it unlocks many cool features!

    AltStyle によって変換されたページ (->オリジナル) /