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

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

Re: Make <delete> save the deleted text into the killing ring


From: Emanuel Berg
Subject: Re: Make <delete> save the deleted text into the killing ring
Date: Thu, 15 Dec 2022 09:48:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

aitor 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!

*char

The method ... it's done like that.

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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