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

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

Re: delete buffer content from the point


From: Robert Pluim
Subject: Re: delete buffer content from the point
Date: Tue, 13 Jul 2021 13:51:45 +0200

>>>>> On Tue, 13 Jul 2021 11:44:57 +0000, Philip Kaludercic 
>>>>> <philipk@posteo.net> said:
    Philip>     (defun local/delete-rest-of-buffer ()
    Philip>       "Delete the buffer contents from the point onwards."
    Philip>       (delete-region (point) (point-max)))

    Philip> would probably do the job, without having to append the region to 
the
    Philip> kill ring.

Note that this will not delete to the end of the buffer if narrowing
is in effect; you'd need to throw in a (widen) for that.

Robert
-- 



reply via email to

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