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: Wed, 14 Dec 2022 20:58:59 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

John Haman wrote:

> The function `delete-forward-char' takes an optional
> argument, killflag. Maybe OP could use something like
>
> (define-key global-map (kbd "<delete>") #'(lambda ()
>                                             (interactive)
>                                             (delete-forward-char 1 t)))

Yes, but then you brake the interface, in particular the
N argument which is now hardcoded to 1, so it's better with
a wrapper function which offers a transparent interface - i.e.
the same, except it defaults to t instead for KILLFLAG ...

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




reply via email to

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