help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [External] : Q3 - how to delete by words, not cut?


From: Drew Adams
Subject: RE: [External] : Q3 - how to delete by words, not cut?
Date: Sun, 15 Dec 2024 02:42:12 +0000

> What if I want not to cut (or how you call it - kill) a word with
> "backward-kill-word" and "kill-word", but delete it (so as not to put
> the words into the exchange buffer (clipboard))?
                     ^^^^^^^^^^^^^^^
                            ^
                       kill buffer

Something like this:

(defun my-backward-delete-word (arg)
  "Delete backard ARG words.
ARG is the numeric prefix arg (default 1)."
  (interactive "p")
  (let ((opt  (point)))
    (backward-word arg)
    (delete-region opt (point))))

Bind it to some key.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]