From: aitor <aitors2005@gmail.com>
To: Gregory Heytings <gregory@heytings.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Make <delete> save the deleted text into the killing ring
Date: Thu, 15 Dec 2022 09:40:31 +0100 [thread overview]
Message-ID: <Y5rdf/6IXGQjnjl4@sipc87.si.ehu.es> (raw)
In-Reply-To: <52007260f0ebe2e0ad16@heytings.org>
On Wed, Dec 14, 2022 at 08:17:45PM +0000, Gregory Heytings wrote:
>
> >
> > <delete> char is bound to `delete-forward-char` which does not save the
> > deleted text into the kill ring by default. How can I change this
> > behavior and make <delete> actually save the killed text into the ring?
> >
>
> (defun kill-forward-char (n)
> (interactive "p")
> (let ((delete-active-region 'kill))
> (delete-forward-char n t)))
>
> (global-set-key [delete] #'kill-forward-char)
This works like a charm. Thank you!
next prev parent reply other threads:[~2022-12-15 8:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-13 11:12 Make <delete> save the deleted text into the killing ring aitor
2022-12-14 11:23 ` aitor
2022-12-14 17:44 ` Emanuel Berg
2022-12-14 19:52 ` John Haman
2022-12-14 19:58 ` Emanuel Berg
2022-12-14 20:17 ` Gregory Heytings
2022-12-14 20:43 ` Emanuel Berg
2022-12-15 8:40 ` aitor [this message]
2022-12-15 8:48 ` Emanuel Berg
2022-12-15 6:14 ` Eli Zaretskii
2022-12-15 6:15 ` Emanuel Berg
2022-12-15 8:31 ` aitor
2022-12-15 9:04 ` Eli Zaretskii
2022-12-15 10:18 ` Thibaut Verron
2022-12-15 10:24 ` Gregory Heytings
2022-12-15 10:46 ` Emanuel Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y5rdf/6IXGQjnjl4@sipc87.si.ehu.es \
--to=aitors2005@gmail.com \
--cc=gregory@heytings.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).